πDebug
Get Constant
<variant> debug.getconstant(<function> f, <int> idx)Returns the constant at index
idxin functionfor levelf.
Get Constants
<table> debug.getconstants(<function> f)Returns the constants in function
for at levelf.
Get Info
<table> debug.getinfo(<function> f)Returns a table of information about function
f.
Info:
name
String
The name of the function.
short_src
String
A shorter version of source.
what
String
What the function is: Lua = Lua function - C = C function
currentline
Integer
The line that is currently active.
nups
Integer
The number of upvalues that the function has.
func
Function
The function that is active.
source
String
Where the function was defined.
Get Proto
Gets the inner
functionoffatindex.
Get Protos
Retrieves all prototype functions used inside
fn.
Get Registry
Returns the Lua registry.
Get Stack
Gets the method stack at level or function
f.
Get Upvalue
Returns the upvalue with name
idxin function or levelf.
Get Upvalues
Retrieve the upvalues in function
for at levelf.
Set Constant
Set constant
idxto tuplevalueat level or functionf.
Set Metatable
Set the metatable of
otomt.
Set Proto
Replaces
fiatindexwith functionreplacementat level or functionfi.
Set Stack
Sets the stack indice at
indicetovalueat level or functionf.
Set Upvalue
Set upvalue
idxtovalueat level or functionf.
Valid Level
Checks if
fncan run atlevel.
Alternative:
isvalidlevel
Last updated