Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebug - How to start in JS debug mode when page loads

I'm looking at a web page where when I push the submit button on a form, it brings up a new page where it runs some javascript and then closes the window.

Is there any way I can step through the javascript on the new page? I tried setting break on next in Firebug on the first page, but the next page still closes the window.

(I'm open to other tools besides Firebug if neccessary, I just need to step through the javascript)

Update:

I should have mentioned I don't have access to the code :-(

like image 942
Greg Avatar asked Sep 19 '12 14:09

Greg


2 Answers

If you have access to the code, you can place this little statement where you want to have a breakpoint:

debugger;

I am not sure about firebug, but I expect it to work there too.

like image 146
sra Avatar answered Sep 27 '22 02:09

sra


put debugger; in your JavaScript code. and press F12 key just after window open.

like image 43
Anoop Avatar answered Sep 27 '22 02:09

Anoop