如何在浏览器中调试Dojo? [英] How to debug Dojo in browser?

查看:127
本文介绍了如何在浏览器中调试Dojo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前(试图)用Worklight Studio 5.0.6和Dojo(Mobile)1.8.3开发一个应用程序。我真的很难找到正确的调试方法。在等待5-10分钟后,在服务器上构建部署过程,Chrome调试器中的错误通常如下所示:

I'm currently (trying) to develop an app with Worklight Studio 5.0.6 and Dojo (Mobile) 1.8.3. I have a really hard time to to find a proper method for debugging. After waiting 5-10 minutes for the build an deploy-process on the server, an error usually looks like this in the Chrome debugger:

我应该如何在MY源中跟踪此错误?整个堆栈跟踪包含Dojo代码的完整,它在20个抽象层之后生成绝对无用的错误消息。

How am I supposed to track down this error in MY source? The whole stack trace consists entirely of Dojo code which generates an absolutely useless error message after 20 abstraction layers.

严重的是,你如何处理这在现实生活中?您在浏览器中调试Dojo驱动的应用程序使用什么方法?

Seriously, how do you guys handle this in real life? What methods do you use for debugging Dojo-driven apps in the browser?

spyro

推荐答案

在dojoConfig中是否提供了 isDebug:true ?另外,尝试看看其他浏览器是否也是这样。

Did you provide isDebug: true in your dojoConfig? Also, try to see if the same occurs in other browsers.

更新:我最近发现Google Chrome和Dojo调试有问题我认为它与异步加载文件有关。您可以在@spyro的提供的屏幕截图中看到, ReferenceError 对象是空白的(您可以注意到,由于空括号 {} )。如果要解决这个问题,请重新打开Goog​​le Chrome的控制台(例如,点击 F12 两次)。重新打开后, ReferenceError 不应该为空,现在您可以使用旁边的箭头展开该对象,并获得有关失败的更详细的信息。

Update: I recently discovered that there are issues with Google Chrome and Dojo debugging and I think it has to do with the asynchronous loading of files. As you can see in the provided screenshot of @spyro, the ReferenceError object is blank (which you can notice because of the empty brackets {}). If you want to solve that, reopen the console of Google Chrome, (for example by tapping F12 twice). After reopening the ReferenceError should not be empty anymore and now you can expand that object by using the arrow next to it and get a more detailed message about what failed.

这篇关于如何在浏览器中调试Dojo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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