Skip to content
>devspeak
← glossary
level 2Bugs & Debugging

Stack trace

also: stack traces, stacktrace, traceback, backtrace

The list shown with an error that names the functions that were running when it happened, pointing to the file and line where things broke.

a bit more technical

A report of the chain of active function calls at the moment an error or exception occurred. Each line typically gives a function name, file, and line number. Some languages list the innermost call first; Python lists it last.

picture it

Breadcrumbs showing the path you took to where you got lost. You see the exact spot, plus every turn that led there.

why it matters

A stack trace is one of the most useful things to paste to an agent when something crashes. It points straight at the failing line, instead of leaving the agent to guess.

what your agent might say
agent
From the stack trace, the crash starts in formatPrice() in cart.ts line 31, called from CheckoutSummary. The price is undefined for gift cards.
how you might use it
you → your agent
The app crashed when I clicked Export. Here's the full stack trace. Find where it starts in our own code, not in the library files.
common mistake

Copying only the first line of the error. The lines below it show where in your code the problem started, which is often the most useful part.

builds on