javascript - How to debug scripts retrieved by RequreJS in Chrome -


i using third party plugin calls scripts using requirejs. want debug e.g. setting breakpoints in scripts didn't show in script tab of chrome's developer tools.

is there anyway me perform debugging in chrome?

the difficulty in debugging modules loaded requirejs if module loaded if conditions x happens , condition not exist when application first loaded, have wait until condition occurs before can put breakpoints on module's code.

for instance if want debug function bar in module foo , foo loaded this:

if (x) {     require(["foo"], function (foo) {         foo.bar();     }); } 

you'd have trigger condition x before can start adding breakpoints inside foo.bar. likely, you'd want put breakpoint @ location of foo.bar() call have opportunity add breakpoint inside foo.bar.

this true in chrome , firefox, , in other browsers offer debugging facilities.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -