最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论