gpt4 book ai didi

javascript - Chrome/Firefox 使事件监听器断点在停止之前跳过 jQuery 和其他库

转载 作者:行者123 更新时间:2023-11-30 05:43:57 26 4
gpt4 key购买 nike

我正在调试第三方 HTML/Javascript 页面。

如果我设置 XHR 断点的事件监听器断点,那么一旦发生这种情况,调试器就会停止运行,因为第一层解释是在 jQuery 或另一个大型库的级别,这些库太大而无法在调试器中合理处理。

我不想闯入这些库,它们不是有趣的代码路径所在的地方。

我希望像往常一样继续执行事件处理程序,并在遇到某些应用程序级代码时且仅中断。

这在 Chrome/Firefox 中可行吗?

最佳答案

如果您愿意使用 Firefox 的预发布版本,内置的开发人员工具现在有一个 black box feature :

When a source is black boxed:

  • Any breakpoints it may have are disabled.
  • When “pause on exceptions” is enabled, the debugger won’t pause when an exception is thrown in the black boxed source; instead it will wait until (and if) the stack unwinds to a frame in a source that isn’t black boxed.
  • The debugger will skip through black boxed sources when stepping.

这个特性肯定会在Firefox Aurora中, 可能在 Firefox Beta到目前为止(我还没有检查过)。

关于javascript - Chrome/Firefox 使事件监听器断点在停止之前跳过 jQuery 和其他库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19113581/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com