更新时间:2023-12-03 23:28:22
您可以使用 主题 .currentThread()。getStackTrace()
。
You can use Thread.currentThread().getStackTrace()
.
返回 StackTraceElement
表示程序的当前堆栈跟踪。
That returns an array of StackTraceElement
s that represent the current stack trace of a program.