Chrome debugging - break on next click event

JavascriptDebuggingGoogle ChromeGoogle Chrome-Devtools

Javascript Problem Overview


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?

Javascript Solutions


Solution 1 - Javascript

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

DevTools Event Listener Breakpoints

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionD.R.View Question on Stackoverflow
Solution 1 - JavascriptKonrad DzwinelView Answer on Stackoverflow