GWT:空堆栈

发布于 2024-12-17 05:07:55 字数 134 浏览 6 评论 0原文

每当我想做一些操作时,我都会遇到这个异常。

(TypeError): b.k.g.E is null stack: TBe([object Object]) ....

我怎样才能纠正它?

I get this exception every time when I want do some operation.

(TypeError): b.k.g.E is null stack: TBe([object Object]) ....

How can I correct it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野生奥特曼 2024-12-24 05:07:55

首先,消息应读作“X is null”和“stack: ...”,而不是“null stack”。

您可以通过查看 GWT 生成的 symbolMap(默认在 WEB-INF/deploy 中)来“反混淆”TBe 的含义:找到与浏览器正在加载的排列相对应的 symbolMap 文件(symbolMap 文件名与浏览器加载的 cache.html 文件相同)然后搜索其中包含 TBe (区分大小写!),它将为您提供 Java 代码中相应的方法。这可能会提示您哪些内容可能为空。

另外,如果您使用 Chrome,您可以在开发工具中漂亮打印 JS 代码,这样您就可以轻松调试代码:在 TBe 函数中设置断点以及调试、分步、检查变量等。就像您在 Eclipse(或任何 IDE)中使用 Java 所做的那样。

请注意,GWT 2.5 将生成 SourceMaps,它允许您在浏览器中查看并“调试”您的 Java 代码!屏幕截图此处和设计文档那里

First, the message should be read as "X is null" and "stack: ...", not "null stack".

You can "deobfuscate" what TBe means by looking at the symbolMap generated by GWT (by default in WEB-INF/deploy): find the symbolMap file corresponding to the permutation your browser is loading (the symbolMap file name is the same as the cache.html file loaded by your browser) and then search for TBe within it (case sensitive!), and it'll give you the corresponding method in your Java code. That might give you a hint as to what could be null.

Also, if you use Chrome, you can pretty-print the JS code in the Dev Tools, which allows you to easily debug the code: set a breakpoint in the TBe function and debug, step-by-step, inspecting variables, etc. Just as you do in Java within Eclipse (or whichever your IDE).

Note that GWT 2.5 will generate SourceMaps which will allow you to see and "debug" your Java code from within your browser! Screenshot here, and design doc there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文