开发者

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

开发者 https://www.devze.com 2023-03-17 05:30 出处:网络
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 man

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 ea开发者_运维百科ch line?


Have a look at the upper right corner:

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

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

精彩评论

暂无评论...
验证码 换一张
取 消