Open getcallstackOpen getconstantOpen getconstantsOpen getinfoOpen getprotoOpen getprotosOpen getstackOpen getupvalueOpen getupvaluesOpen setconstantOpen setstackOpen setupvalue

Reference

Debug

Constants, upvalues, stack slots, prototypes and call information.

30 functions
FunctionSummary
debug.dumpcodesizeRequests the engine’s native-code size report.
debug.dumpheapAn engine-provided diagnostic entry retained in the debug table.
debug.dumprefsAn engine-provided diagnostic entry retained in the debug table.
debug.getcallstackgetcallstackget_callstackReturns metadata for visible Lua call frames.
debug.getconstantgetconstantget_constantReads one constant from a Lua function or a visible caller frame.
debug.getconstantsgetconstantsget_constantsReturns a Lua function’s constant table.
debug.getinfogetinfoget_infoReturns a table describing a function or visible caller frame.
debug.getmemorycategoryReads the current thread’s memory-category tag.
debug.getprotogetprotoget_protoSelects the nested function prototypes declared inside a Lua function.
debug.getprotosgetprotosget_protosLists the nested function prototypes declared inside a Lua function.
debug.getstackgetstackget_stackReads a live Lua frame’s stack slots.
debug.getupvaluegetupvalueget_upvalueReads one captured variable of a Lua closure.
debug.getupvaluecountCounts a function's upvalues.
debug.getupvaluesgetupvaluesget_upvaluesReturns the captured variables of a Lua closure.
debug.infoReturns selected function or caller metadata as separate values.
debug.loadmoduleAn engine-provided diagnostic entry retained in the debug table.
debug.profilebeginBegins a named MicroProfiler region.
debug.profileendEnds the most recently opened MicroProfiler region.
debug.resetmemorycategoryRestores the thread’s automatically assigned memory-category tag.
debug.setconstantsetconstantset_constantReplaces an existing constant in a Lua function.
debug.setinfosetinfoChanges the name that debug.info(target, "n") reports.
debug.setmemorycategoryAssigns the current thread’s memory-category tag.
debug.setstacksetstackset_stackWrites a live Lua frame’s stack slots.
debug.setupvaluesetupvalueset_upvalueChanges one captured variable of a Lua closure.
debug.tracebackFormats the current call stack without throwing an error.
debug.tracerefsAn engine-provided diagnostic entry retained in the debug table.
errorRaises an error and stops the current call unless it is caught.
getfunctionreferencesFinds what still refers to a function.
getobjectreferencesFinds what still refers to a value.
isvalidlevelvalidleveldebug.isvalidleveldebug.validlevel+2Checks whether a visible caller level exists.