搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How do you set future breakpoints in Debugger?

  • 3 个回答
  • 1 人有此问题
  • 4 次查看
  • 最后回复者为 NoahSUMO

more options

I'm using the JavaScript Debugger in Firefox v. 28.0 and following a textbook lesson that requires setting a future breakpoint in an HTML file. However, in the shortcut menu that appears, I see options for regular and conditional breakpoints, but not a future type. I know that you could apply future breakpoints in earlier versions, but is that no longer possible?

I'm using the JavaScript Debugger in Firefox v. 28.0 and following a textbook lesson that requires setting a future breakpoint in an HTML file. However, in the shortcut menu that appears, I see options for regular and conditional breakpoints, but not a future type. I know that you could apply future breakpoints in earlier versions, but is that no longer possible?

被采纳的解决方案

Thanks so much for those screenshots! That helped a lot!

I showed them to the developers of the Firefox devtools and they agreed the term "future breakpoints" must have come from the Venkman debugger. And that the author mistakenly said Firefox had them.

One of the developer's reply: I think that future breakpoints term comes originally from Venkman, where it represents a promise that real breakpoint will be set as soon as possible e.g. as soon as the script exists again or is compiled.

Another developer comment: Unfortunately devtools' debugger doesn't have them. That is, it would be useful to be able to set a breakpoint in arbitrary JS that you knew would be loaded in the future but that isn't possible right now.

But another developer seems to think the feature already exists: Dev #1: Btw. I think that future breakpoints actually already work. You can set a breakpoint any time and it's applied on the right script when it's created. No additional UI needed.

Dev #2: you mean they work under the hood - but there's no UI for it? :) Dev #2: if the script isn't created, it doesn't show up in the debugger UI...

Dev #1: and yes, if the script doesn't exist it isn't displayed in the UI, so you need to operate the (debuggee) page to create it at least once, have it in the UI and set the breakpoint associated with the url/line/column. If the breakpoint is persistent across page-reloads and even firefox-restarts (like in Firebug) it's there all the time till the user explicitly delete it and till the URL of the script exists. It's created automatically for the script even if the script isn't in the UI at the beginning.


How to continue after a breakpoint is reached: There should be a blue triangle (looks like a play button) in the top left corner of the Debugger UI, once you click that it should resume execution. You can also press the F8 key to resume.

See: https://developer.mozilla.org/en-US/docs/Tools/Debugger#toolbar "Pause/Resume (F8): pauses or resumes execution of the script you're debugging. When it's blue and "pressed", as above, that means the script is paused, either because you've paused it with this button or because you've hit a breakpoint."

Also see this page for many good tips and screenshots: https://developer.mozilla.org/en-US/docs/Tools/Debugger

定位到答案原位置 👍 1

所有回复 (3)

more options

Hi, I asked a Firefox developer about your question but he said it was never possible to set a future breakpoint from the UI. How were you setting the future breakpoints in previous versions? Do you remember the last Firefox version that had this feature?

If you can take a screenshot of that, that'd help too. If you need a link to a older Firefox version, let me know.

more options

The setting of future breakpoints was covered by the author of a textbook I'm using to study JavaScript. I don't know what version of Firefox is being described. I will try to attach an image of those chapter pages for your review. Another concern is that the author mentioned a Continue button to resume execution after the program encounters a breakpoint. I don't see that button on the Debugger and can't figure out how to restart execution.

more options

选择的解决方案

Thanks so much for those screenshots! That helped a lot!

I showed them to the developers of the Firefox devtools and they agreed the term "future breakpoints" must have come from the Venkman debugger. And that the author mistakenly said Firefox had them.

One of the developer's reply: I think that future breakpoints term comes originally from Venkman, where it represents a promise that real breakpoint will be set as soon as possible e.g. as soon as the script exists again or is compiled.

Another developer comment: Unfortunately devtools' debugger doesn't have them. That is, it would be useful to be able to set a breakpoint in arbitrary JS that you knew would be loaded in the future but that isn't possible right now.

But another developer seems to think the feature already exists: Dev #1: Btw. I think that future breakpoints actually already work. You can set a breakpoint any time and it's applied on the right script when it's created. No additional UI needed.

Dev #2: you mean they work under the hood - but there's no UI for it? :) Dev #2: if the script isn't created, it doesn't show up in the debugger UI...

Dev #1: and yes, if the script doesn't exist it isn't displayed in the UI, so you need to operate the (debuggee) page to create it at least once, have it in the UI and set the breakpoint associated with the url/line/column. If the breakpoint is persistent across page-reloads and even firefox-restarts (like in Firebug) it's there all the time till the user explicitly delete it and till the URL of the script exists. It's created automatically for the script even if the script isn't in the UI at the beginning.


How to continue after a breakpoint is reached: There should be a blue triangle (looks like a play button) in the top left corner of the Debugger UI, once you click that it should resume execution. You can also press the F8 key to resume.

See: https://developer.mozilla.org/en-US/docs/Tools/Debugger#toolbar "Pause/Resume (F8): pauses or resumes execution of the script you're debugging. When it's blue and "pressed", as above, that means the script is paused, either because you've paused it with this button or because you've hit a breakpoint."

Also see this page for many good tips and screenshots: https://developer.mozilla.org/en-US/docs/Tools/Debugger

由NoahSUMO于修改