How to add breakpoints for custom events?

If I want to debug standard DOM events, the browser dev tools make it easy to have Event Listener Breakpoints.

But now I need to debug custom events that are created with CustomEvent(“foobar-happened”) and dispatched with dispatchEvent(…). I don’t see those in the browser devtools. How can I inspect such custom events?


No, I cannot (or should not) add debugger statements to the code that dispatches those events. Such code is coming from outside my project (e.g. from a third-party library, or code from another team), and it may be unfeasible for me to find all the places to add such debugger statements.