A stack trace is a list of the steps a program was taking when an error happened. It often shows the chain of functions that led to the problem, along with file names and line numbers.

Imagine following a trail of notes backward from the place a problem was noticed to the earlier steps that led there. A developer can use the trace to find which part of the code needs attention.

Some entries in a stack trace come from the app's own code, while others come from libraries. The trace is a clue to investigate, not always a complete explanation by itself.