Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Dojo in browser?

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:

enter image description here

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.

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

spyro

like image 453
spyro Avatar asked Sep 30 '13 09:09

spyro


1 Answers

For dojo.parse errors, I find it useful to pause the Chrome debugger on all exceptions (the purple icon on your screenshot, should be blue). You usally get more details about the cause of the error, the name of the DOM node being parsed, etc. in the first exception being raised.

Rémi.

like image 156
Rémi Svahn Avatar answered Sep 23 '22 11:09

Rémi Svahn