Starting with Firefox 69, debugging an application that includes event handlers is simplified because the debugger now includes the ability to automatically break when the code hits an event handler.
To break when event listener code is hit, expand the Event Listener Breakpoints section, find the event in which you are interested and check the box. In the image above, the
keydown event listener breakpoint was selected.
Now when a
keydown event happens, execution will pause as soon as it enters the listener code. This may not sound like much, after all, you can add regular breakpoints at the entry point of the listener. If you have multiple elements, all of which have event listeners for the
keydown event attached, this becomes an enormous time saver.