Greg
Greg

Reputation: 47124

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 :-(

Upvotes: 6

Views: 3570

Answers (2)

Anoop
Anoop

Reputation: 23208

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

Upvotes: 1

sra
sra

Reputation: 6408

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.

Upvotes: 5

Related Questions