FreakProgrammer
FreakProgrammer

Reputation: 93

Debugging in Google Chrome

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

Answers (2)

Val Berthe
Val Berthe

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 :

Chrome console example

On the left, you got the file involved (VM998 for example) and the corresponding line (3, for example).

Hope it helps.

Upvotes: 0

StackOverMySoul
StackOverMySoul

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

Related Questions