Chrome / Firefox sets a breakpoint on all onclick javascript events at once

I am trying to debug a third-party HTML / Javascript page, but I cannot easily find the script entry points to set breakpoints on them.

I want the debugger to break any onclick event handler. At the moment, if the page is configured with something like

document.getElementById("foo").onclick = bar;

it’s generally not easy to determine that foo and bar are related.

So, I want to smash all the onclicks, wherever they are.

Can I do this in Chrome or Firefox?

+4
source share
1 answer

Chrome:

Chrome inspector -> sources -> Event Listener Breakpoints

Firefox: get EventBug

eventBug : Firefox, JavaScript?

+13

All Articles