Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer Developer Tools does not show source code using RequireJS

I am attempting to debug a page issue where IE 9 will work the first time on my requirejs/backbone application, but will fail on the page reload. However, when I attempt to debug this problem using the f12 IE developer tools, I cannot navigate to the source to set a breakpoint because IE does not load any of the files that RequireJS includes. How can I get around this issue to fix my IE headache??

like image 229
Matt Broekhuis Avatar asked Feb 21 '13 17:02

Matt Broekhuis


1 Answers

I guess I am late for the party but hope my answer helps you and others as well. The file that you want to debug or the line in the file, simply add this --> debugger; before that line.

So, when require.js loads your script and encounter that string i.e. debugger; exists it will automatically be stopped at that line.

like image 72
Mozak Avatar answered Oct 24 '22 12:10

Mozak