How can I get function call stack (backtrace) programmatically in JavaScript?
Is this even possible?
This wasn't available at the time the question was asked but now all modern web browsers support console.trace(). Be aware that this feature is considered as non-standard. More about that here: https://developer.mozilla.org/en-US/docs/Web/API/Console.trace
Maybe this page has an answer for you: http://eriwen.com/javascript/js-stack-trace/