stack traceback

Stack trace

A stack trace (also called stack backtrace or stack traceback) is a report of the active stack frames instantiated by the execution of a program.

Although stack traces may be generated anywhere within a program, they are mostly used to aid debugging by showing where exactly an error occurs. The last few stack frames often indicate the origin of the bug.

For example, the following Python program contains an error.

def a():
def b():
def c():

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

Traceback (most recent call last):
  File "", line 10, in 
  File "", line 2, in a
  File "", line 5, in b
  File "", line 8, in c
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.

See also

Search another word or see stack tracebackon Dictionary | Thesaurus |Spanish
Copyright © 2015, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature