What is the difference between the terms "Call Stack" and "Stack Trace" ?
相关问题
- Generic Generics in Managed C++
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- How to Debug/Register a Permanent WMI Event Which
- Visual Studio 2019 - error MSB8020: The build tool
A call stack is typically "the current stack of operations" - i.e. while it's running.
A stack trace is typically a copy of the call stack which is logged at some sort of failure, e.g. an exception.
In other words, while you're debugging you will look at the current call stack - but when you look at logs, you'll get a stack trace. At least, that's my interpretation of the terms :)
I think Wikipedia does a fairly good job at distinguishing between them:
In other words, the call stack is the actual data structure in memory, while the stack trace is a snapshot of said data structure.
Call stack is a data structure storing information about active subroutines in a running program. Stack trace is a representation of the call stack.