Chrome debugging - break on next click event

D.R. picture D.R. · Sep 18, 2013 · Viewed 76.2k times · Source

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?

Answer

Konrad Dzwinel picture Konrad Dzwinel · Sep 18, 2013

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