问题描述
我们有一个按钮。点击事件由第三方框架处理,但是框架可能是错误的。我们要调试框架,但是我们不知道相应的事件处理程序代码驻留设置断点。如何通过打破下一次点击事件,看看第三方框架处理这个点击的位置和方式?
您要查找的是。每当侦听到所选事件的事件侦听器被触发时,触发这些断点。您可以在源选项卡中找到它们。在您的情况下,展开鼠标类别并选择点击。
We have a button. Click events are handled by a 3rd party framework, however, the framework is buggy somehow.
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?
What you are looking for are 'Event Listener Breakpoints'. 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'.
这篇关于Chrome调试 - 打破下一次点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!