Table returned by debug.getinfo.
For functions defined in C/C++, the following members will always have the given values:
- what = "C"
- source = "[C]"
- nparams = 0
- isvararg = true
- namewhat = ""
- short_src = "[C]"
- linedefined = -1
- currentline = -1
- lastlinedefined = -1
Reference to the function that was passed in. If a stack level was specified, this will be the function at that stack level. 0 = debug.getinfo, 1 = function that called debug.getinfo, etc.
The line where the function definiton starts (where "function" is located).
The line the function definition ended (where "end" is located).
The shortened name of the source (without the @). May be truncated if the source path is long.
The language used. Either "Lua" or "C".
The current line. This will be -1 if the code is not executed from a file.
Option: l (lowercase L)
The function name. This will be nil if the name cannot be found. Only works if stack level is passed rather than function pointer.
The function "type". This will be "global", "local", "method", "field". Can also be an empty string if the function name could not be found. Only works if stack level is passed rather than function pointer.
Whether the function is variadic (has a
The number of arguments the function uses excluding varargs.
Upvalue count. Max index that can be used with debug.getupvalue. C functions can have upvalues but they cannot be accessed from Lua.
A table of all the active lines in the function - that is, lines with code that actually does something (not blank lines or lines with comments only).
The table keys will be line numbers, and their values will all be true. Lines that are inactive are simply not included in the table - they have the value nil.
It doesn't check for activeline in subfunctions.