1

Is there any automatical way to trace execution in a javascript application (in browser) ?
My need is to know according to the use case :

  • which functions are called
  • which functions call which functions

In fact, it's a code coverage by instrumentation (like Istanbul) but for runtime.

------------------------- EDIT -------------------------
I want to generate a map of functions used during execution.
Example :
1 - for use case #1 :
functA1 -> [functB3, functC2 -> [functE5, functD8 ] ]
functA2 -> [functT2]
functA3

With this kind of execution map, i can understand how the appl works
and compare execution between two releases.

2 Answers 2

2

on chrome debugging is awesomely done:

  1. ctrl + option + j

  2. click on 'Sources'

  3. and then go to "Event Listener Breakpoints" and choose the event that may call your function and after that where the function call is going just press the F10 on it will move to next statement to execute and so on. Please refer the screenshot: https://iamlalit.tinytake.com/sf/MTY5MDc1N181NjM1ODA1

Sign up to request clarification or add additional context in comments.

Comments

1

You can set breakpoints in the browser's sources tab. On chrome it's ctrl + option + j and click on 'Sources'. From there you set a breakpoint at the function you want and can trace what gets executed line by line.

Hope this helps.

1 Comment

Thanks, but i search for a more complete solution like the capacity to create diagramm of execution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.