5

How can I get function call stack (backtrace) programmatically in JavaScript?

Is this even possible?

2 Answers 2

7

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

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

Comments

4

Maybe this page has an answer for you: http://eriwen.com/javascript/js-stack-trace/

1 Comment

i also had found it just after posting this but left the question open anyway. Thanks

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.