开发者

Why is there an apparent lack of a "Next" option in Firebug's JavaScript debugger?

Seems that the JavaScript debugger is lacking a very basic feature: Next.

"Next" (like in PDB the Python debugger) should execute the current line and stop. Seems pretty basic.

Now maybe I'm completely missing something (which is why I ask), but I understand the existing commands to work as follows:

Step Into: descend into the body of current function

Step Over: execute the current function w/o descending

Step Out: move back up the stack

Resume: continue running until the next breakpoint

My reading shows that Step Over should be equivalent to "Next" but it doesn't appear to be. I just want to execute the line, w/o descending, ascending, or having to set another breakpoint imemdiately after the line I'm on. I'm very accustomed to type "n n n n n n" in PD开发者_运维技巧B to step through code line by line. Firebug seems to be missing this...or I'm missing it ;-)

Finally, I also feel that "previous" or "back" should be available. With that enticing "playhead" in the leftmost column, it would be great to be able to drag that thing around, executing the line of code as it goes. I can dream.

Any clarification on this would be helpful.


The "Step over" function does not mean, "skip the next line". It means to execute it, but should it contain a function call, to treat the statement itself as the unit of work. In other words, the "over" just means, "don't step into any functions involved".

In my experience "previous" or "back" are the kinds of features that can only really be supplied by either an extremely sophisticated debugger, or else for languages that are by nature very conducive to such things. Something like Firebug is almost certainly barred by the nature of browser reality from actually implementing those. Consider what it would mean to back up over a statement that removed an element from the DOM. Firebug would have to ask the browser to give it back, and I'd bet money that there's just no way to do that (at least not without Firebug becoming even more gigantic and expensive than it already is :-)


I guess you mean that you don't want to click on the "Step Over" button several times to move to the next line. You need a button that directly move you to the next line. There is no "Next" button but you can use "Run to this Line" command in the context menu.

There are some research tools which let you to move backwards but they are not still practical.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜