> What GWT needs here is something closer to what you get with proguard - a 
> mapping file created during compilation that could be used to run the 
> obfuscated/javascript exception through a utility to give the correct stack 
> trace with zero overheads.
> I'm not entirely sure on how proguard accomplishes it, but I'd say it 
> would be the perfect solution.
>

We also do not use emulated stack traces because of performance and code 
size overhead. So we simply deploy the symbol maps generated by GWT 
compiler and use StackTraceDeobfuscator on the server. We also extended 
StackTraceDeobfuscator a bit because we received exceptions where the stack 
trace is actually inside the exception message instead of the exception 
stack trace (the exception stack trace was empty). So we try to deobfuscate 
the exception message as well in this case.

Given the above the quality of stack traces now depends on the browser 
version our clients use. We do not support IE6/7 and IE 8 support will be 
dropped next year (regardless of what GWT does). So we mainly deal with 
newer browsers and we pretty much always get deobfuscated stack traces that 
provide some useful information. Its not perfect but it works. We never get 
the concrete line number where the exception occurs but we often enough 
have the method name. Of course sometimes we have no stack information at 
all (IE8).

In addition you can enhance the stack trace by providing additional client 
information. For example you could send the current URL to the server which 
tells your the current place state if you use GWT Places. You could also 
implement a custom Logging Handler that logs into a ring buffer and once a 
client exception occurs you send the last x client log entries along with 
the stack trace. Or if you do not want to enable logging itself in 
production you could still use the ring buffer approach and store "user 
actions" in it and then send these to the server (similar to client side 
logging). Or you trace user click coordinates and their underlying elements 
(event preview handler)

So before enabling full stack trace emulation in GWT you can do quite a few 
things to get information about what has happened inside the app once the 
exception had occurred. 

Btw. we stopped using SourceMaps for Chrome because for whatever reasons 
StackTraceDeobfuscator has imports from gwt-dev.jar that are needed when 
SourceMaps are enabled.

-- J.

 

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to