stacktrace(也常写作 stack trace):堆栈跟踪 / 调用栈信息。指程序出错或抛出异常时,系统打印出的函数/方法调用链,用来显示错误发生时程序“走到哪里”,便于定位问题。(在不同语言里也常称 traceback、backtrace。)
/ˈstækˌtreɪs/
The stacktrace shows where the error happened.
堆栈跟踪显示错误发生的位置。
After the deployment, the monitoring system captured a stacktrace that pointed to a null pointer in the payment module.
部署之后,监控系统捕获了一段堆栈跟踪,指向支付模块里的空指针问题。
由 stack(栈) + trace(追踪/踪迹) 组成。这里的 stack 通常指调用栈(call stack),记录函数调用的层层嵌套;trace 表示把这些调用路径“追出来”。因此 stacktrace 就是“把调用栈的路径打印出来的记录”。