Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging in GWT Super Dev Mode?

So far, debugging in GWT super dev mode seems to be a real pain. If there are any errors, there is no stack trace, just a cryptic message given in the chrome console. Is there a way to get all errors to print a stack trace, like in the dev mode?

I already have source maps on I believe, since if I go to Sources in Chrome's dev tools, I can see the source code of my java classes.

like image 400
Ali Avatar asked May 25 '14 00:05

Ali


People also ask

How do I use Super Dev Mode in GWT?

Starting with GWT 2.7, Dev Mode launches Super Dev Mode automatically. Just start Dev Mode and reload the page, and it will recompile automatically when necessary.

What is Super Dev?

Super Dev Mode is used to launch a process to compile the application and source maps for modern browsers. A web server will be needed to launch with this process when debugging in a browser. Such as Dev Mode built in Jetty for the web server. DevMode will run the Super DevMode CodeServer by default in GWT 2.7. 0+.


1 Answers

GWT.setUncaughtExceptionHandler lets you set an exception handler, which will handle all exceptions. You can then get the stacktrace of that exception using something like this code, and then print exception.toString() and the stack trace to the console. This has worked reasonably well for me.

like image 182
Ali Avatar answered Sep 27 '22 17:09

Ali