When javascript is stuck in a loop the Google Chrome browser will eventually display a pop up asking me to wait or kill the page. I pressed wait to begin with quite a few times to the point that Chrome no longer asks for the webpage I am testing. Now I wish to see what exact HTML it is displaying so I need the pop up back in order to kill execution and view source.
Anywhere in Chrome options I can do this?
Insert a breakpoint (
debugger;) in your javascript code prior to where you suspect the code may be looping:Ctl+Shft+J to open dev tools tab prior to loading your page, then load the page in Chrome and execution will stop when Chrome reads in the
debugger;statement. You can then check your source and debug js step-by-step.