From time to time, I will have huge jQuery event handlers, for example: -
$(document).on("click",".some-class", function(){
});
which are attached to elements on my page. This is not a problem if there are several event handlers on my page, but on a huge application, debugging these event handlers can be a real pain in the neck. Sometimes I will not understand this when the callback is called on certain events.
So my question is: is there any option or trick in dev-tools to find out which functions are being called?
It should not be dev-tools. It could be javascript or jquery trick too.
In addition, I understand what I can execute console.log, debugger;or even put console.trace()callbacks in my functions, but I was wondering if there was anything cleaner or smarter.
source
share