Stack trace
A stack trace is a diagnostic record of the active or recently unwound function or method calls at a point in program execution, often including source locations.
Troubleshooting Java, Second Edition
A stack trace is a diagnostic record showing the sequence of active function or method calls at a particular execution point, typically including source locations.
- How it is used
- Guides debugging and log-based investigations by revealing how execution reached a method, pause point, exception, or thread state.
- How deep it goes
- Explains frames, callers, source lines, hidden framework logic, and thread context, but treats JVM internals only through diagnostic output.
- Examples
- Demonstrates controller-service calls, aspect-modified parameters, logged exception traces, non-blocking breakpoints, and thread-dump lock cycles.
- What you can do after
- Diagnose/debug with it by tracing callers, locating hidden execution, questioning exception causes, and inspecting thread blocking relationships.
Read how Troubleshooting Java, Second Edition explains stack trace →
Python How-To
A traceback is a diagnostic report showing the sequence of active calls and execution context when an exception occurs.
- How it is used
- Uses tracebacks as the first step in locating exceptions during Python debugging.
- How deep it goes
- Explains call order and traceback fields, then traces a method-name error to its correction and discusses dependency calls.
- Examples
- Uses a Task method-name error and an exercise adding methods to produce a longer traceback.
- What you can do after
- Diagnose/debug exceptions by reading the last call and tracing upward to relevant application code when dependencies are involved.
Troubleshooting Java: Read, debug, and optimize JVM applications
A representation of the sequence of method calls active at a particular point in a program's execution.
- How it is used
- Maps the active method-call path to a paused line or helps identify who called a method in remote logs.
- How deep it goes
- Defines stack traces and demonstrates debugger interpretation and exception-based printing, but does not detail their internals.
- Examples
- Uses a Spring product-saving flow altered by an aspect and logged calls from Decoder to extractDigits.
- What you can do after
- Diagnose call paths with a debugger or print a stack trace to logs without throwing an exception.
Read how Troubleshooting Java: Read, debug, and optimize JVM applications explains stack trace →
The Art of Code
A stack dump is a diagnostic snapshot showing the call stacks of threads or goroutines in a running or failed process.
- How it is used
- Uses stack traces to locate failures while keeping raw diagnostic output away from end users.
- How deep it goes
- Defines trace contents and describes diagnostic uses without detailing how to interpret individual frames.
- Examples
- Follows an HTTP 500 response from a broken form to a backend log trace identifying the faulty line.
- What you can do after
- Diagnose failures by correlating a network error with a timestamped application log and its stack trace.
JavaScript in Depth
A report of active call frames that records the sequence of function calls leading to a point in execution, typically for diagnostics.
- How it is used
- Supports debugging by exposing the function-call sequence and source location associated with an Error.
- How deep it goes
- Explains call-chain capture, structured frames, lazy serialization, and memory cost, but leaves formatting engine-specific.
- Examples
- Uses nested inner, middle, and outer functions to show frames, file locations, and console output.
- What you can do after
- Diagnose failures by tracing the recorded call chain and distinguish debugging details from recovery data.
The Well-Grounded Python Developer: How the pros use Python and Flask
A stack trace is a chronological report of the call path and source locations associated with an exception or other execution event.
- How it is used
- Uses execution history to locate failures and guide exception handling or debugging.
- How deep it goes
- Defines stack traces and demonstrates nested calls, but stops short of internals beyond call-stack traversal and source locations.
- Examples
- Uses division by zero, invalid numeric input, nested functions, and logged exception output.
- What you can do after
- Diagnose/debug with it by tracing failures to source lines and preserving exception details in logs.
The Well-Grounded Rubyist, Fourth Edition
Stack tracing is the technique of examining the sequence of active calls during program execution.
- How it is used
- Supports debugging and runtime introspection by locating the calls, files, and lines associated with an error or execution point.
- How deep it goes
- Explains call ordering, exception backtraces, caller output, and caller_locations, but does not detail the parsed location interface.
- Examples
- Uses URI loading errors, rescued ArgumentError output, nested x-y-z calls, and a raised exception to demonstrate trace formats.
- What you can do after
- Diagnose/debug with it by reading automatic traces, printing exception backtraces, and inspecting caller-generated call histories.
Read how The Well-Grounded Rubyist, Fourth Edition explains stack trace →
Learn Rust in a Month of Lunches
A backtrace is a record of the call stack showing the sequence of function calls leading to a program point or failure.
- How it is used
- Diagnoses failed tests and panics by tracing execution back to the function and source line involved.
- How deep it goes
- Explains output reading, environment configuration, runtime capture, and status handling without developing tracing internals.
- Examples
- Uses failed Rust assertions, RUST_BACKTRACE settings, Backtrace::capture(), and BacktraceStatus matching.
- What you can do after
- Diagnose/debug with Rust backtraces by enabling capture, locating application frames, and handling unavailable traces.
Read how Learn Rust in a Month of Lunches explains stack trace →
Build Applications with Local AI Models on a Mac
A Python diagnostic report showing the sequence of calls leading to an exception and where it occurred.
- How it is used
- Uses tracebacks to diagnose errors as part of systematic debugging.
- How deep it goes
- Connects reading tracebacks with isolating problems, forming hypotheses, and testing fixes, without detailing traceback internals.
- What you can do after
- Diagnose/debug with tracebacks by isolating problems, forming hypotheses, and testing fixes.
Read how Build Applications with Local AI Models on a Mac explains stack trace →
Also covered in
- Go in Practice, Second Edition
- Build High Value Software SystemsIn early access (MEAP)
- The Quick Python Book, Fourth Edition
- Django in Action
- Modern Angular
What to know first
- exceptionAn exception is a runtime signal or value representing an abnormal condition that interrupts ordinary program flow and can be handled or propagated.
- call stackA call stack is a runtime LIFO structure that tracks active function or method calls, including their execution contexts and return information.
- debuggingDebugging is the systematic investigation of software behavior to identify, understand, and correct defects or unexpected behavior.
- namespaceA global namespace is a top-level naming context that binds identifiers defined at the outermost level and distinguishes them from names in nested scopes.
Related concepts
- debugginguses · Debugging is the systematic investigation of software behavior to identify, understand, and correct defects or unexpected behavior.
- call stackuses · A call stack is a runtime LIFO structure that tracks active function or method calls, including their execution contexts and return information.
- debuggerproduced by · A debugger is a software tool for controlling program execution and inspecting runtime state to investigate behavior and diagnose defects.
- profilerproduced by · A profiler is software that measures and analyzes a program’s runtime behavior or resource use to characterize performance and identify bottlenecks.
- thread dumppart of · A thread dump is a diagnostic snapshot of the threads in a running program, including their states and stack traces.
Questions about stack trace
What is stack trace?
A stack trace is a diagnostic record of the active or recently unwound function or method calls at a point in program execution, often including source locations.
Which Manning books explain stack trace?
Troubleshooting Java, Second Edition, Python How-To, Troubleshooting Java: Read, debug, and optimize JVM applications, The Art of Code, JavaScript in Depth, The Well-Grounded Python Developer: How the pros use Python and Flask, The Well-Grounded Rubyist, Fourth Edition, Learn Rust in a Month of Lunches and 1 more.
What should I know before learning stack trace?
Manning books that teach stack trace usually introduce exception, call stack, debugging and namespace first.
What is stack trace part of?
Stack trace is part of thread dump. A thread dump is a diagnostic snapshot of the threads in a running program, including their states and stack traces.
What is stack trace also called?
Stack trace is also called traceback or backtrace.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.








