print(debug.traceback("Stack trace:"))
function func1() func2() end function func2() print(debug.traceback("Stack trace:")) end func1()
Stack trace: [string "test.lua"]:5: in function 'func2' [string "test.lua"]:2: in function 'func1' [string "test.lua"]:9: in main chunk [C]: in ?
标签:function,func2,func1,string,trace,打印,lua,堆栈 From: https://www.cnblogs.com/barrysgy/p/17847372.html