简体   繁体   English

如何完全忽略 chrome 中的“调试器”语句?

[英]how to totally ignore 'debugger' statement in chrome?

'never pause here' can not work “永远不要停在这里”行不通

前

after I continue:我继续后:

后

still paused仍然暂停

To totally ignore all breakpoints in Chrome, you must do as follows:要完全忽略 Chrome 中的所有断点,您必须执行以下操作:

  1. Open your page in the Chrome browser.在 Chrome 浏览器中打开您的页面。

  2. Press F12 or right-click on the page and select Inspect .F12或右键单击页面并选择Inspect

  3. In the Source panel, press Ctrl + F8 to deactivate all breakpoints.在 Source 面板中,按Ctrl + F8停用所有断点。 (or: At the top-right corner, select deactivate breakpoints .) (或:在右上角,选择deactivate breakpoints 。)

All breakpoints and debugger statements will be deactivated.所有断点和debugger语句都将被停用。

I tested it in Chrome 79 .0.3945.88 (64-bit) and I found that the debugger statement is ignored.我在 Chrome 79 .0.3945.88(64 位)中对其进行了测试,发现debugger语句被忽略了。

显示停用断点对调试器语句的影响的屏幕截图

To stop hitting debugger statements, you must either set a "never pause here" breakpoint, OR you must pause stopping on exceptions.要停止命中调试器语句,您必须设置“从不在这里暂停”断点,或者您必须暂停在异常时停止。
This works because debugger breakpoints are considered exceptions by the browser.这是因为调试器断点被浏览器视为异常。

在此处输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM