javascript Chrome 调试 - 在下一次点击事件时中断
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18877190/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Chrome debugging - break on next click event
提问by D.R.
We have a button. Click events are handled by a 3rd party framework, however, the framework is buggy somehow.
我们有一个按钮。单击事件由第 3 方框架处理,但是,该框架在某种程度上存在缺陷。
We want to debug the framework, however, we don't know where the corresponding event handler code resides to set a breakpoint. How to generally "break on next click event" and see where and how this click is handled by the 3rd party framework?
我们想调试框架,但是,我们不知道相应的事件处理程序代码驻留在何处来设置断点。通常如何“中断下一次点击事件”并查看 3rd 方框架在何处以及如何处理此点击?
回答by Konrad Dzwinel
What you are looking for are 'Event Listener Breakpoints' on the Sources
tab. These breakpoints are triggered whenever any event listener, that listens for chosen event, is fired. You will find them in the Sources tab. In your case, expand 'Mouse' category and choose 'Click'.
您要查找的是选项卡上的“事件侦听器断点” Sources
。每当触发任何侦听所选事件的事件侦听器时,就会触发这些断点。您将在“来源”选项卡中找到它们。在您的情况下,展开“鼠标”类别并选择“单击”。