-1

Is there a way to put breakpoints across all of the JS code?

For example, let's say I have some button and when I click on it some JS code gets executed, but I don't know what exact code or the file where that code is executed.

So if I put breakpoints on all of the code after I click on that button breakpoint will activate and I will know which code gets executed.

Can I do this or is there something similar?

Francis
  • 1,798
  • 1
  • 26
  • 32
JustA Guy
  • 1
  • 2
  • What you're looking for is comprehensively covered here. https://stackoverflow.com/questions/23472334/how-to-find-what-code-is-run-by-a-button-element-in-chrome-using-developer-tools – Francis Aug 31 '18 at 22:15
  • 1
    And welcome to Stackoverflow – Francis Aug 31 '18 at 22:16

1 Answers1

0

Instead of having to put breakpoints everywhere, you could look at the registered event listeners of your element. There you can see the file and line of its code, also by clicking on it, the chrome dev tools open that location.

enter image description here

Lucas
  • 413
  • 1
  • 7
  • 15