Chrome 调试 - 在下一次点击事件时中断 [英] Chrome debugging - break on next click event

查看:42
本文介绍了Chrome 调试 - 在下一次点击事件时中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个按钮.点击事件由第 3 方框架处理,但是,该框架在某种程度上存在缺陷.

We have a button. Click events are handled by a 3rd party framework, however, the framework is buggy somehow.

我们想调试框架,但是,我们不知道相应的事件处理程序代码驻留在何处来设置断点.通常如何中断下一次点击事件"并查看 3rd 方框架在何处以及如何处理此点击?

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?

推荐答案

您正在寻找的是 'Event Listener Breakpoints'.每当触发任何侦听所选事件的事件侦听器时,就会触发这些断点.您将在来源"选项卡中找到它们.在您的情况下,展开鼠标"类别并选择点击".

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'.

这篇关于Chrome 调试 - 在下一次点击事件时中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆