在GWT超级开发模式下进行调试? [英] Debugging in GWT Super Dev Mode?

查看:170
本文介绍了在GWT超级开发模式下进行调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,GWT超级开发模式的调试似乎是一个真正的痛苦。如果有任何错误,则不存在堆栈跟踪,只是Chrome控制台中提供的隐藏消息。有没有办法得到打印堆栈跟踪的所有错误,像在开发模式?

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?

我已经有源地图我相信,因为如果我去源在Chrome的开发工具中,我可以看到我的java类的源代码。

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.

推荐答案

GWT.setUncaughtExceptionHandler 允许您设置一个异常处理程序,它将处理所有异常。然后,您可以使用此代码等异常的堆栈跟踪,然后打印异常。 toString()并将堆栈跟踪到控制台。这对我来说效果很好。

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.

这篇关于在GWT超级开发模式下进行调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆