Category
Debug
Runtime inspection and debug utilities.Category guide
Overview
Use this overview to understand the category before opening a specific function.- See what this group of functions is meant to solve.
- Compare function names and descriptions in one table.
- Open a function for syntax, arguments, returns, and examples.
Debug
Available functions
| Function | Description |
|---|---|
getconstant | Returns one constant from a Lua function or stack level by one-based index. |
getconstants | Returns constants from a Lua function or stack level as a table keyed by one-based constant index. |
getinfo | Returns a metadata table for a function or stack level. |
getproto | Returns a nested Lua function by one-based index. |
getprotos | Returns all nested Lua functions from a Lua function or stack level as a one-based array table. |
getreg | Returns the current Lua registry table. |
getstack | Reads stack slot values from a Lua stack frame. |
getupvalue | Returns one upvalue from a Lua function or stack level by one-based index. |
getupvalues | Returns all upvalues from a Lua function or stack level as a one-based array table. |
isvalidlevel | Checks whether a numeric stack level is within the current call stack range. |
setconstant | Replaces one constant in a Lua function or stack level by one-based index. |
setstack | Replaces one stack slot value in a Lua stack frame. |
setupvalue | Replaces one upvalue in a Lua function or stack level by one-based index. |