1

For learning purposes I would like to use a tool to be able to watch the javascript stack as I write a trivial program with either break points or places where I program in pauses. This is a part of my attempt to become more educated about computer science. If that isn't possible then maybe a way to have snapshots of the stack at different points in the program.

I'm flailing here because I don't know what I'm talking about.

edit

Is a stack trace what I'm looking for? I just have to trigger a stack trace when I want to see the state of the stack?

MZaragoza
  • 10,108
  • 9
  • 71
  • 116
  • What exactly are you trying to accomplish? Also, related: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack – Etheryte Jul 01 '14 at 00:08
  • I found this. Might help: http://stackoverflow.com/questions/2060272/while-debugging-javascript-is-there-a-way-to-alert-current-call-stack – jasonscript Jul 01 '14 at 03:08
  • For educational purposes I want to look at the stack at different points while running a trivial script. I'm trying to observe the stack in action. For example I might want to make a simple recursive function that divides a number and see a snapshot of the state of the stack in each recursion. – user2259534 Jul 02 '14 at 00:26
  • Thanks for the link. it is helpful but I won't know if it solves my problem til I try it sometime in the next few days. – user2259534 Jul 02 '14 at 00:27
  • I assume you are using js in the browser? https://developer.chrome.com/devtools/docs/javascript-debugging If not, native V8 has debug api as well, but it's a bit more complicated to set up. – Bergi Apr 23 '15 at 13:40

0 Answers0