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

How do you run one line of JavaScript at a time in Firebug? - Stack Overflow

programmeradmin4浏览0评论

So I just started using Firebug to debug JavaScript, and I have no trouble setting breakpoints, but how can I run one line at a time after hitting a breakpoint? Is there any way to do this without manually setting a new breakpoint each line?

So I just started using Firebug to debug JavaScript, and I have no trouble setting breakpoints, but how can I run one line at a time after hitting a breakpoint? Is there any way to do this without manually setting a new breakpoint each line?

Share Improve this question asked Jul 1, 2011 at 18:22 zjmillerzjmiller 2,7876 gold badges30 silver badges30 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 11

Have a look at the upper right corner:

The button Step over which I annotated with Move to next line, executes the current line and goes to the next one. Step by step. To also execute called functions step by step, you have to click on Step into (annotated with Go into function call).

Just press F11 to single step. Or press the "Step into" button.

If you want to go into the code of a function that is called on the current line you have to use F11 or "Step into" instead.

If you want to go to the next line of your code use F10 or "Skip" button when you're in the debug view. This maybe is better if you're using a big framework. Then you don't want to step through each line of the framework but more likely only through your own code...

use

debugger;

at appropriate place in ur js, this will trigger a breakpoint if firebug is running, or you can use debugger; after every line if you cannot get into functions and then simply use f5 to jump to next debugger call.

发布评论

评论列表(0)

  1. 暂无评论