Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Code

stack trace

advancedwidespread

A stack trace is a list printed at the moment of an error: it shows through what nested steps the program reached the point where the error occurred.

In plain terms

Imagine burning a roux while cooking. To understand what happened, you trace the steps backward: you made the roux for the soup, the soup for lunch, and lunch for the guests. A stack trace does the same for a program: it shows which task triggered which other, all the way to the error location.

Programs consist of small, mutually calling parts, called functions. When one encounters an error, the system prints the entire call chain: file names, line numbers, and the type of error. This strange, often frighteningly long text is the stack trace.

A plain error message only states that something is wrong. A stack trace also shows where the error occurred and the path the program took to get there. Therefore, this is the primary clue for developers and coding agents in debugging: the agent reads it, finds the marked line, and tries to fix the code there.

How it works

  1. While running, the program keeps track in a "stack" of which function it is currently in and where it was called from. Every new call goes to the top of the stack, like another plate on a stack of plates.
  2. When a function finishes, it is removed from the top of the stack, and the program returns to where the call originated.
  3. If an error occurs, the runtime records a snapshot of the call stack. For each level it notes the function name and, if that information is available, the file and line number.
  4. It outputs this list to the screen or a log file along with the error type and a short description. The actual location of the error appears at the beginning of the list (for example in Java) or at the end (for example in Python), depending on the language.
  5. The developer or coding agent reads through the list, finds the first affected line of its own code, and starts the fix from there.

An everyday example

You ask an AI assistant to write a short program to sum your bills, but upon execution, a dozen lines of English text appear with the label 'Traceback'. If you copy this verbatim into the conversation, the assistant reads from it which line caused the program to fail and why, then provides a corrected version.

Who is affected

developerIt is the everyday basic tool of debugging, and it shows fastest where the code broke. → Code
employeeIf a corporate program throws an error, copying the stack trace exactly enables the company's IT support (helpdesk) to assist much faster. → Work & HR
parent, student, teacherFor those learning to program, one of the first lessons is that you should not fear error messages but read them. → Education & Family
entrepreneur, executiveA publicly visible stack trace can reveal the system's internal structure, making it a security and compliance issue.

A common misconception

MythA stack trace means the program is permanently broken, and the many incomprehensible lines only mean something to an expert.
In realityA stack trace is not the problem itself but a help: it shows where to look for the error. The key is usually in two places: the error name and the line pointing to your own code.

Limits and risks

Similar, but not the same

Related concepts

Broader

debugging, software development

Narrower

–

On the edge

error message, Call stack, exception, log file, coding agent, programhiba, testing, terminal

A brief history

The basis of a stack trace is the data structure called the stack. Alan Turing already described the stack-like storage of return addresses in 1946. German mathematicians Friedrich L. Bauer and Klaus Samelson filed a patent for the stack in 1957, originally for evaluating expressions. Printing the call chain later became a natural part of error handling in programming languages. Today, most widely used languages offer it built-in; in C and C++, however, a debugger program or a separate library is typically required.

Where things stand

For decades, it has been a basic tool of programming. By the end of 2026, coding agents also read it routinely: they run the code, interpret the stack trace and try to fix the problem on their own.

Status: 2026 November

Also known as

stack trace · stacktrace · stack dump · call chain · traceback · backtrace · stack backtrace

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.