Reputation: 93
Is there a way to debug a specific function without knowing where it is?
For example you have a project that has 100 000 lines of code on a lot of files. To find some function that's triggered by some button you need to search a long time and then you put the break point. Is there some tools to do that when I click the button automatic to stop the debugger of Google Chrome?
Upvotes: 0
Views: 59
Reputation: 2064
You can check on the console
tab what triggers your error, and what will be the files involved.
Here's an example on Chrome :
On the left, you got the file involved (VM998 for example) and the corresponding line (3, for example).
Hope it helps.
Upvotes: 0
Reputation: 2037
On the right side of the Sources Tab look for Event Listener Breakpoints
, expand the Mouse events, and select the click event, chrome will go into debugger mode every time there's a click event
Upvotes: 1