Wednesday, March 2, 2016

debug dynamically loaded JavaScript file

if using vs2015, need to us IE and step into dynmically loaded javascript file, if you do not step into then it will not stop at the breakpoint of the dynamically load JavaScript file.

debug-dynamically-loaded-javascriptwith-jquery-in-the-browsers-debugge

http://stackoverflow.com/questions/9092125/how-to-debug-dynamically-loaded-javascriptwith-jquery-in-the-browsers-debugge


ou can give your dynamically loaded script a name so that it shows in the Chrome/Firefox javascript debugger. To do this you place a comment at the end of the script:
//@ sourceURL=filename.js
This file will then show in the "Sources" tab as filename.js. In my experience you can use \'s in the name but I get odd behaviour if using /'s.

No comments:

Post a Comment