Debug in Lua
This document introduces 2 simple methods to debug Lua code.
debug library
function myfunction ()
print(debug.traceback("Stack trace"))
print(debug.getinfo(1, "Sl"))
print("Stack trace end")
return 10
end
myfunction ()
print(debug.getinfo(1))
n
selects fields name and namewhatf
selects field funcS
selects fields source, short_src, what, and linedefinedl
selects field currentlineu
selects field nup
clidebugger
https://github.com/ToddWegner/clidebugger
Reference
https://www.lua.org/pil/23.html
https://www.tutorialspoint.com/lua/lua_debugging.htm