1

Is it possible to check the function call stack when running a JavaScript app remotely? (Not using a browser/Google developer tools). For example, I'd like to check the function call stack of the app run on a TV or a Mobile/Tablet device. I currently use jsconsole.com to look at console logs remotely. Is there a library that I could add to my JavaScript app to monitor the call stack? Thank you

code
  • 5,294
  • 16
  • 62
  • 113
  • 1
    Can you clarify, do you mean you'd like to debug remotely? Or would your like to write function stack in you console.log? – Kirill Slatin Apr 08 '15 at 02:07
  • Sorry. Yes I'd like to debug remotely. For example, I'd like to run the web app on my TV but see the order of functions that are executed from my PC. I would basically like to avoid having to write console.log() in every function. Is it possible to print the function stack from inside the app? – code Apr 08 '15 at 02:13
  • AFAIK stack trace is accessible only via debugger or exception. As a result the only trick to get stack trace at runtime is to cast own (immediately catched) exception and extract trace from it (mind browser differences) – Kirill Slatin Apr 08 '15 at 02:28
  • What about creating a virtual machine as advised in [answer to 'Debug Chrome on Google TV'](http://stackoverflow.com/a/12945214/4573999)? – Kirill Slatin Apr 08 '15 at 02:32

1 Answers1

0

This is not a solution to getting the stack trace of javascript function calls remotely, but I mainly use jsconsole.com. The TV app can include a jsconsole unique id into its' app and the developer can monitor console logs remotely through the jsconsole website.

code
  • 5,294
  • 16
  • 62
  • 113