What is the difference between Call Stack and Stack Trace?

后端 未结 3 808
眼角桃花
眼角桃花 2021-02-03 21:38

What is the difference between the terms \"Call Stack\" and \"Stack Trace\" ?

3条回答
  •  甜味超标
    2021-02-03 22:33

    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 :)

提交回复
热议问题