MalcolmInTheCenter
MalcolmInTheCenter

Reputation: 1605

How can I find out which functions are being called?

I'm using mmenu jQuery plugin which makes the page slide to the left and displays a menu on the right when a user clicks a menu icon. To make the main page slide back the user has to click the main page on the left.

Using Chromes Developer Tools how can I find out which functions are being called so I can know which function is responsible for sliding the main page back to its original position?

Upvotes: 0

Views: 210

Answers (4)

Benjadahl
Benjadahl

Reputation: 80

What you could do, is making every function output their own name using

console.log("function name");

Upvotes: 1

undeletable
undeletable

Reputation: 1580

Try placing breakpoints wherever in the code this action could be performed.

Upvotes: 0

Cheezy Code
Cheezy Code

Reputation: 1715

This is one of the way i know, its bad but it works. To filter the files, you can click the file names in the profile, it will take you to the function.

This is one of the way i know its bad but it works.

Upvotes: 1

Rajendra kumar Vankadari
Rajendra kumar Vankadari

Reputation: 2387

when you click on particular element in chrome dev tools, in the right side partition (left partition should show your DOM) you will find styles, computed, Event Listeners. So if you visit event listeners tab it will show all types of events associated for any particular element typically with it's callback function in a single line.

Upvotes: 1

Related Questions