Wednesday, July 22, 2015

Re: no runtime error stacktraces showing up in devmode

You are not doing anything wrong, the website is a bit outdated. By default GWT 2.7 DevMode now uses the so called SuperDevMode (SDM). SDM compiles all your Java source to JavaScript and thats why you see JavaScript exceptions inside your Chrome console instead of Java exceptions inside the DevMode window. 

The old, classic DevMode which actually executes your Java code as Java and thus produces Java exceptions is considered deprecated because it requires a browser plugin which does not work anymore in most recent browser versions.

So you should get used to the JavaScript exceptions. If you can, I would recommend using GWT 2.8 SNAPSHOT which has quite some logging fixes. With these fixes you should always have a link next to each exception stack frame in Chrome console which points to the corresponding Java file + line number. If you click on the link then Chrome will show you the Java file. 
If you can not use GWT 2.8 SNAPSHOT then you could try using https://gist.github.com/jnehlmeier/cddbc476fd330b1d4999 to get links to Java files in JavaScript stack traces.

There is also an Eclipse plugin on Github called SDBG which allows you to connect from Eclipse to your Chrome browser. Then all Chrome console output is redirected to your Eclipse console and you can also set break points inside Eclipse which will be synced with the browser. IntelliJ 14 supports this out of the box.

-- J.

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

No comments:

Post a Comment