- This topic has 3 replies, 3 voices, and was last updated 15 years, 9 months ago by pompiuses.
-
AuthorPosts
-
nvintilaMemberThanks for the JS debugger.
I am evaluating it and i can only get it to stop in JS code embedded in the HTML file i started with or the scripts listed in the head. We use Dojo and most of the JS code gets downloaded on demand: scripts are downloaded by Dojo and eval()-ed.
Is this debugger supposed to debug this JS code too?
I am currently trying to change Dojo to emit includes <script></script> for the scripts Dojo imports/requires/downloads.
I am having some success but i am breaking the internal state of the widget manager in Dojo.
Do you guys already have a solution to this?
Thanks
Nick
nvintilaMemberI figured out how to use something from Dojo to achieve this.
1) Include browser_debug.js after dojo.js
<script type="text/javascript" src="../../dojo/dojo.js"></script> <script type="text/javascript" src="../../turbo/turbo.js"></script> <script type="text/javascript" src="../../dojo/src/browser_debug.js"></script>
2) Call writeIncludes after the last dojo.require from the HTML file you debug.
dojo.hostenv.writeIncludes();
This sequence effectively overrides the default code loading mechanism in Dojo (see loadUri from browser_debug.js) and emits <script/> snippets in the head of the document thus convincing the browser to download the scripts itself. Using a smart technique this new loadUri includes the scripts in the correct order based on their dependencies.
Good luck
Nick
Riyad KallaMemberNick,
Thank you for following up for the benefit of others, great tip. I’m going to make it sticky.
pompiusesMemberI know this is an old thread, but I’m having trouble debugging using dojo 1.1.1.
There’s no dojo/src/browser_debug.js or dojo.hostenv.writeIncludes() anymore.
Have someone found a good solution to setting breakpoints in your own dojo widgets using the MyEclipse javascript debugger?
Thanks!
-
AuthorPosts