1

I'm trying to write JavaScript code which monitors and logs the stack trace continuously.

I know there’s the console.trace() which can be used to print the stack trace to the console, but what I need is printing the stack trace for every function call in real time. That is, logging all the flows in the site.

In other words what I'm trying to implement is a script that when injected into the DOM will write all the stack trace to the console.

No FireBug, no breakpoints, no manually adding console.trace() into each function.

Jay
  • 717
  • 11
  • 37
  • Is it OK if it logs the stack traces to the console? You could add a stack trace to every function with something like this: http://stackoverflow.com/questions/5033836/adding-console-log-to-every-function-automatically – Tim Grant Nov 26 '16 at 15:25
  • There's no such method .The Chrome developer tools do have a timeline and CPU profiling tools. The ladder is able to print (play back) stack traces of you program after recording them during run. The timeline tool gives you a rough view of the stack – try-catch-finally Nov 26 '16 at 20:43

0 Answers0