Tushar Chutani
Tushar Chutani

Reputation: 1560

How to find out what function is being called from a certain file in Javascript

I am not really sure if this is the right place to ask this question. But I am working with a code base that I am very new to and I want to see what functions are being called from a certain file using Chrome dev tools.

Upvotes: 0

Views: 966

Answers (1)

Adam Lichter
Adam Lichter

Reputation: 140

If you're running the project locally, you might be able to check out the Sources tab in devtools. If your project is set up propery to do so (i.e. not minified or something) you can usually navigate to the file that has the functions you want to check out. From there you can actually put break points on each function and step through them, or just see what values they're receiving. This is all assuming it's a web based project done in jquery, or react, or just plain old javascript, and not a node.js project or something similar.

Hope that helps!

Upvotes: 1

Related Questions