简体   繁体   English

为什么Firebug的JavaScript调试器中显然缺少“下一步”选项?

[英]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. 似乎JavaScript调试器缺少一个非常基本的功能:下一步。

"Next" (like in PDB the Python debugger) should execute the current line and stop. “ Next”(类似于PDB中的Python调试器)应执行当前行并停止。 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 "nnnnnn" in PDB to step through code line by line. 我非常习惯在PDB中键入“ nnnnnn”来逐行浏览代码。 Firebug seems to be missing this...or I'm missing it ;-) Firebug似乎丢失了这个……或者丢失了;-)

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. 几乎可以肯定,Firebug之类的东西实际上无法实现浏览器现实的本质。 Consider what it would mean to back up over a statement that removed an element from the DOM. 考虑一下备份从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 :-) Firebug必须要求浏览器将其退还给我,我敢打赌,没有办法做到这一点(至少在Firebug变得比以前更大,更昂贵的情况下,它才没有:-)

I guess you mean that you don't want to click on the "Step Over" button several times to move to the next line. 我想您的意思是您不想多次单击“ Step Over”按钮以移至下一行。 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. 有一些研究工具可让您向后退,但它们仍然不实用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Firebug的调试器功能? - How to use Firebug's debugger functions? Firebug调试器无法正常工作 - Firebug debugger not working 为什么Mozilla Javascript Debugger的断点会与函数声明对齐? - Why does Mozilla Javascript Debugger's breakpoint snap to function declaration? 如何借助Firebug或IE 8调试器或chrome调试器找出javascript函数的流程? - Way to figure out the flow of javascript function with the help of firebug or IE 8 debugger or chrome debugger? 为什么Firebug无法检测到某些JavaScript? - Why is Firebug unable to detect some JavaScript? 一个无法访问的JavaScript对象属性 - 为什么Firebug会显示这个? - An Inaccessible JavaScript Object property - Why is Firebug showing this? 为什么我的javascript无法在Firebug中运行? - why is my javascript throw not working in Firebug? 为什么我的 JavaScript 文件没有任何明显的错误就崩溃了? - Why does my JavaScript file crash without any apparent errors? 是否可以通过 WebKit、FireBug 或 IE8 开发工具等调试器来调试动态加载 JavaScript? - Is possible to debug dynamic loading JavaScript by some debugger like WebKit, FireBug or the IE8 Developer Tool? 如何克服 JavaScript 代码中缺少 Perl 的 \\G? - How to overcome the lack of Perl's \G in JavaScript code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM