Debugging in GWT Super Dev Mode?

本小妞迷上赌 提交于 2020-01-11 02:31:46

问题


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.


回答1:


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.




回答2:


How do you start super dev mode? From inside eclipse maybe? If you have a maven project and run it from the command line (e.g. mvn gwt:run) a window pops up showing you the stack traces of exceptions and other information as well.



来源:https://stackoverflow.com/questions/23850898/debugging-in-gwt-super-dev-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!