How can we know which javascript method is called and where it is defined? (When methods are attached dynamically)
Let us consider situation where JQuery Bind method is used to bind an event.
If I see control in FireBug with FireQuery, I can see events=Object{click =} handle=function()
But I don’t know which method is attached with click event.
Is there any way to detect this method is being called from this file?
For 3-4 files, I could search. but for large number of files with heavy code, it is difficult to search.
How can we know which javascript method is called and where it is defined?
Share
You can use
console.trace()but this only works within the functionYou may also find the question and answer here useful:
what events are bound?