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

13 functions
FunctionDescription
getconstantReturns one constant from a Lua function or stack level by one-based index.
getconstantsReturns constants from a Lua function or stack level as a table keyed by one-based constant index.
getinfoReturns a metadata table for a function or stack level.
getprotoReturns a nested Lua function by one-based index.
getprotosReturns all nested Lua functions from a Lua function or stack level as a one-based array table.
getregReturns the current Lua registry table.
getstackReads stack slot values from a Lua stack frame.
getupvalueReturns one upvalue from a Lua function or stack level by one-based index.
getupvaluesReturns all upvalues from a Lua function or stack level as a one-based array table.
isvalidlevelChecks whether a numeric stack level is within the current call stack range.
setconstantReplaces one constant in a Lua function or stack level by one-based index.
setstackReplaces one stack slot value in a Lua stack frame.
setupvalueReplaces one upvalue in a Lua function or stack level by one-based index.