Aliases
getinfo
Arguments
function | number
required
The function to inspect, or a positive stack level identifying a caller.
Returns
DebugInfo
Function metadata including source, name, line numbers, parameter/upvalue counts, and func.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns function/frame metadata and the function itself.
debug.getinfo(target: function | number): DebugInfo
getinfolocal function sample(a) return a end
local info = debug.getinfo(sample)
print(info.source, info.numparams, info.what)
