简体   繁体   English

如何在 Chrome Dev Tools 中停止调试器?

[英]How do I stop the debugger in Chrome Dev Tools?

I would like to interact with the page I am building with the console open.我想在控制台打开的情况下与我正在构建的页面进行交互。 Unfortunately, if I trigger an event on my page the Dev Tools switches from "Console" to "Sources" and says "paused in debugger."不幸的是,如果我在我的页面上触发一个事件,开发工具会从“控制台”切换到“源”并显示“在调试器中暂停”。 It's driving me bananas.它让我吃香蕉。 Is there a way to deactivate it?有没有办法停用它?

调试器在我与页面交互时自动激活

How to deactivate breakpoints如何停用断点

Just press Ctrl + F8.只需按 Ctrl + F8。 Alternatively you can click the related button next to the buttons controlling the debugger.或者,您可以单击控制调试器的按钮旁边的相关按钮。

在 devtools 中停用断点

This way the execution won't stop.这样执行就不会停止。 It is especially useful when you try to inspect websites not under your control that left breakpoints ( debugger command) in the source code, that might have been done intentionally to prevent you from doing said inspection.当您尝试检查在源代码中留下断点( debugger命令)的不受您控制的网站时,它特别有用,这可能是故意进行的,以防止您进行所述检查。

You likely have a Breakpoint set on an Event.您可能在事件上设置了断点。 To remove it:要删除它:

  1. Open Debugger (F12)打开调试器 (F12)
  2. Click on the Sources Tab单击源选项卡
  3. Click on the Event Listeners Breakpoints accordion dropdown (on the right)单击 Event Listeners Breakpoints 手风琴下拉菜单(右侧)
  4. Unselect (untick) each event that you do NOT want to break on.取消选择(取消勾选)您不想中断的每个事件。

检查您的 DOM、XHR 和事件侦听器断点,并确保它们未被选中/处于非活动状态。

To stop the debugger in Chrome, the circled icon should be deactivated (which will turn it grey colored):要在 Chrome 中停止调试器,应停用带圆圈的图标(这将使其变为灰色): 图标示例

暂无
暂无

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

相关问题 如何在 Chrome 开发工具或 Firefox 开发工具中查看哪些 JS 改变了我的元素的样式? - How do I see what JS is changing style to my elements in Chrome dev tools or Firefox dev tools? 如何在Chrome Dev Tools中使用jQuery遍历执行上下文? - How do I traverse Execution Contexts with jQuery in Chrome Dev Tools? 将调试器作为代码附加到客户端,并在chrome dev-tools中将其停止 - Attach debugger as code behind from client and stop it in chrome dev-tools 使用 Chrome 调试器或 Firefox 开发工具,我可以获取模块中所有 JavaScript 函数输入和退出的日志吗? - Using Chrome debugger or Firefox dev tools, Can I get a log of all JavaScript functions entered & exited in a module? 如何在Chrome开发工具中使用其他行断点标记? - How do I use the additional line breakpoint markers in Chrome Dev Tools? 如何获得Chrome开发工具,以允许我在生产环境中编辑缩小的JavaScript? - How do I get Chrome Dev Tools to allow me to edit minified JavaScript in production? 如何获取源映射以使用Chrome Dev Tools和webpack? - How do I get source mapping to work with Chrome Dev Tools and webpack? 使用“调试器”时,如何在 Chrome 开发工具控制台中获取 promise 的结果? - How to get at the result of a promise in chrome dev tools console when “debugger” is used? 如何在firefox开发工具中使用debugger关键字? - How to use debugger keyword in firefox dev tools? 如何在Chrome开发工具中显示自己的事件 - How can I display own Events in Chrome dev tools
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM