Stack Trace

A stack trace (also called stack backtrace or stack traceback) is a report of the active stack frames at a certain point in time during the execution of a program.

It is commonly used during interactive and post-mortem debugging. It can also be displayed to the user of a program as part of an error message, which a user can report to a programmer.

A stack trace allows to track the sequence of nested functions called up to the point where the stack trace is generated. In a post-mortem scenario this is up to function where the failure occurred (but not necessarily is caused there). Sibling function calls are not visible in a stack trace.

As an example, the following Python program contains an error.

def a: b def b: c def c: error a

Running the program under the standard Python interpreter produces the following error message.

Traceback (most recent call last): File "", line 10, in a File "", line 2, in a b File "", line 5, in b c File "", line 8, in c error NameError: global name 'error' is not defined

The stack trace shows where the error occurs, namely in the c function. It also shows that the c function was called by b, which was called by a, which was in turn called by the code on line 10 (the last line) of the program.

Read more about Stack TraceLanguage Support

Other articles related to "stack trace, stack":

Stack Trace - Language Support
... in-built support for retrieving the current stack trace via system calls ... C++ has no built-in support for doing this, but the stack trace can be retrieved with, e.g ...
MUF (programming Language) - Hello, World
... stored in the variable "me" (the user's dbref), and puts it on the stack ... the code does an implicit PUSH, putting the data on the stack ... After this statement, the string will be put on the stack (above the user's dbref) ...

Famous quotes containing the words trace and/or stack:

    Yet ere I can say where—the chariot hath
    Passed over them—nor other trace I find
    But as of foam after the ocean’s wrath
    Percy Bysshe Shelley (1792–1822)

    “Farewell to barn and stack and tree,
    Farewell to Severn shore.
    Terence, look your last at me,
    For I come home no more.
    —A.E. (Alfred Edward)