Explore Error.stack

Error.stack, while not a published ECMAScript 5 standard, is broadly supported on the web, and enables the developer to readily drill down into errors. This can quickly show you where the problem originated, and will help you to walk the call tree back to where the error condition began. Developers may also find it useful to include when reporting errors that occurred on the site post-deployment, in client-facing scenarios that are typically more difficult to track on the server.

This demo gives you some code samples to let you see how they interact with Error.stack. Try executing them, map the stack trace line information back to the sample code, or even code that you write. You'll be able to see the utility this support provides for debugging scenarios.

In IE, hover over stack frames to highlight their corresponding lines in the code you've entered (or the sample code you're running).

Select a sample or write your own code:

  Run Code
Please note that your browser is not supported for this demo: it does not support Error.stack.



Stack Trace (if any)