Debug
Read and rewrite the constants, upvalues and stack of live code. Entries: 11.
- debugThe debug library. Alongside Luau's own traceback and info, executors extend it to read and rewrite the constants, upvalues, protos and stack of any function.
nil - debug.getconstantReturns the constant at a given index inside a function.
any - debug.getconstantsReturns every constant baked into a function, string literals, numbers and global names.
{ any } - debug.getprotoReturns a function nested inside another. Pass active to get the live closures instead of the prototype.
function - debug.getprotosReturns every function nested inside another.
{ function } - debug.getstackReads values off the Luau stack at a given call level. Without an index it returns the whole frame.
any - debug.getupvalueReturns an upvalue, a local captured by a closure, at the given index.
any - debug.getupvaluesReturns every upvalue captured by a closure.
{ any } - debug.setconstantOverwrites a constant inside a function, changing its behaviour without rewriting it.
() - debug.setstackWrites a value into a live stack slot.
() - debug.setupvalueReplaces an upvalue captured by a closure.
()