【问题标题】:Chrome/Firefox set breakpoint on all javascript onclick events at onceChrome/Firefox 一次在所有 javascript onclick 事件上设置断点
【发布时间】:2013-10-07 10:11:43
【问题描述】:

我正在尝试调试第三方 HTML/Javascript 页面,但无法轻松找到脚本入口点以在其上设置断点。

我希望调试器在任何元素的 onclick 事件处理程序上中断。目前,如果页面设置有类似

document.getElementById("foo").onclick = bar;

那么一般来说很难确定 foo 和 bar 是连接的。

所以,我想中断所有的点击,无论它们在哪里。

我可以在 Chrome 或 Firefox 中执行此操作吗?

【问题讨论】:

    标签: javascript debugging google-chrome firefox


    【解决方案1】:

    铬:

    Chrome inspector -> sources -> Event Listener Breakpoints
    

    火狐: 获取EventBug

    您可以在此处阅读有关 eventBug 的更多信息:Using Firefox, how can I monitor all JavaScript events that are fired?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-17
      • 2013-09-23
      • 1970-01-01
      • 2013-09-15
      • 2012-03-15
      • 2014-04-13
      • 2012-05-23
      • 2018-06-02
      相关资源
      最近更新 更多