[英]In Chrome DevTools, prevent debugger from pausing inside certain files
Running ahead, the "Blackboxing" feature of DevTools does not help. 继续运行,DevTools的“黑匣子”功能无济于事。
So, I have a javascript app, and I want to press "pause script execution" button (see image), and then wait until debugger stops on first line executed. 因此,我有一个javascript应用程序,并且我想按“暂停脚本执行”按钮(参见图片),然后等到调试器在执行的第一行停止。
I need to know which code starts executing after some UI operation. 我需要知道在执行某些UI操作后哪些代码开始执行。
The problem is in one file of the project where there is a setInterval
running all the time. 问题出在项目的一个文件中,其中始终有一个setInterval
运行。 Is there a way to ignore that file, in other words provide DevTools with a blacklist of files for pausing? 有没有办法忽略该文件,换句话说,为DevTools提供了一个文件黑名单以供暂停?
I can dig in code and turn that particular setInterval
off. 我可以挖掘代码并关闭特定的setInterval
。 But using a DevTools feature (if exists) would make life easier. 但是使用DevTools功能(如果存在)将使生活更轻松。
A good way to kill all setInterval
s on the page is 杀死页面上所有setInterval
的好方法是
var maxTimeoutOrIntervalId = setTimeout(()=>{}, 0);
for (var i = 0; i < maxTimeoutOrIntervalId; i++) {
clearInterval(i);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.