Search code examples
javascriptevent-listenergoogle-developer-tools

How to see ALL events of a page in Chrome Developer Tools?


There is no filter button anymore in Chrome Developer Tools/Elements/Event Listeners. The Event Listeners panel will show only the events of the element you select in the Elements panel. So the events attached to child nodes will not show. If I select the body element, no events will populate the Event Listeners tab.
I'm using Chrome version 73.0.3683.86.
Also, I tried in the console to getEventListeners(document) and getEventListeners(document.body).
The result is an empty object. What am I doing wrong? enter image description here


Solution

  • The monitorEvents has just worked for me. Simply run monitorEvents(object [, events]) in your console, e.g. monitorEvents(document.body, "dragenter") or for all events monitorEvents(document.body).

    To stop it run unmonitorEvents(document.body).

    From here: https://developers.google.com/web/updates/2015/05/quickly-monitor-events-from-the-console-panel