0

Is there any tool (free or not) that would profile the executed javascript code paths? The problem is this :

I have a button click event that somehow, somewhere is attached to a button (nt my code, cant find what is attached where), I just want to be able to find the executed javascript after a the button is clicked, or find the function that is being called and put a break point in it and then step trough if I have to ( that is if there is no way to make a list of function that being called and the arguments that they are being called with).

I have looked at this post but it just gave me the event being fired and not the attached function being called nor which javascript file or function is being attached to that event as a listener.

I have tried using chrome developer tool profiler, but that too seems to only care about the long running functions rather than a executable path that was executed.

Thank to Belgi, this link was also of help https://developers.google.com/web/tools/chrome-devtools/debug/breakpoints/add-breakpoints?hl=en#events

Community
  • 1
  • 1
jimjim
  • 2,414
  • 2
  • 26
  • 46
  • 1
    There's no automatic way of doing this. The usual way to find an event handler like this is to either track down where the event handler is being added by searching for DOM references in startup code that are finding the DOM element and hooking up to it or to set a breakpoint in some generic part of the event handling code (if it's using a framework like jQuery). – jfriend00 Aug 09 '16 at 04:16
  • @jfriend00 : Thank you for letting me know where to look for attachements. – jimjim Aug 09 '16 at 04:17
  • You don't want to use the profiler of the Chrome devtools (as you don't want to profile performance/memory), you want to [monitor events](https://developers.google.com/web/tools/chrome-devtools/debug/breakpoints/add-breakpoints?hl=en#events). – Bergi Aug 09 '16 at 06:01
  • @Bergi : Yep, you are right that would do the trick, thank you – jimjim Aug 09 '16 at 07:02

0 Answers0