Lokomotywa
Lokomotywa

Reputation: 2844

Javascript Debugging - find out which script is running

When making myself familiar with unknown code, I often find myself trapped in a situation where I have a huge amount of javscript files and some events triggered when I click around in the browser, which I want to detect in the code. However, regarding the amount of js code, this seems to be a non-trivial task to me.

Is there any tool / workaround that supports me? Like logging every js function called or the like?

Upvotes: 0

Views: 431

Answers (1)

The way of debugging js is different in different browser. I will show how to debug in chrome.

First of all, inspect the button in chrome using chrome developer tools. enter image description here

Then you can see the event listeners attached to that particular button. Make sure ancestors all checkbox is unchecked and the link below the event listener will you to particular code file.

Upvotes: 1

Related Questions