admin管理员组

文章数量:1393166

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

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

Share Improve this question asked Sep 19, 2012 at 14:16 GregGreg 47.2k91 gold badges237 silver badges298 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

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.

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

本文标签: javascriptFirebugHow to start in JS debug mode when page loadsStack Overflow