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
getconstantReads a constant from a function, stack level, or prototype by one-based index.
getconstantsReturns all constants embedded in a function, stack level, or prototype.
getinfoReturns debug metadata for a function or stack level.
getprotoReturns a nested prototype from a function by one-based index.
getprotosReturns all nested prototypes found in a function.
getregReturns the Luau registry table exposed to the executor.
getstackReads stack values from a stack level, or one stack slot when an index is provided.
getupvalueReads an upvalue from a function by one-based index.
getupvaluesReturns all upvalues captured by a function.
isvalidlevelChecks whether a stack level can be inspected safely.
setconstantReplaces a constant in a function or prototype by one-based index.
setstackReplaces a stack slot value at the selected stack level.
setupvalueReplaces an upvalue in a function by one-based index.