IonizeDocsionize.cc ↗

API Reference

Debug Library

Reading and writing constants, upvalues, protos, stack frames, and standard profiling.

22 members

debug.getcallstackReturns a table of the entire stack's information. Table array fields: source (definition), line (start line), what (\"Lua\", \"C\"), name, func.debug.getconstantReturns a singular constant that's derived from a function. Selected via index.debug.getconstantsReturns a table of constants that's derived from a function.debug.getinfoReturns a table of information that's derived from a function or stack level.debug.getprotoGets a cloned proto inside the 'func' unless the 'active' is specified which returns a table of all active protos.debug.getprotosReturn a list of all cloned protos.debug.getregistryReturns the global registry table. The registry is used to store references. Any object referenced in the registry will never be collected by the garbage collector, as the registry itself will never be collected. Thus a strong reference will always be held.debug.getsafeenvReturns the safeenv flag.debug.getstackReturns a table (of the stack) or a singular object from the stack. Only returns objects that are currently on the stack.debug.getupvalueReturns a singular upvalue that's derived from a function's upvalue list. Selected via index.debug.getupvaluesReturns a table of upvalues from a function's upvalue's list.debug.infoReturns debug information about a given stack frame or function object based on the options string (that can contain characters nslfa).debug.isvalidlevelChecks if 'level' is valid in the stackdebug.profilebeginOpens a microprofiler label.debug.profileendCloses the top microprofiler label.debug.setconstantSets a singular constant that's derived from a function. Selected via index.debug.setinfoSets the debug info around the 'func'.debug.setnameChanges the function name specified to the set one.debug.setsafeenvMarks the safeenv for an object.debug.setstackSets a singular object from the stack.debug.setupvalueSets a singular upvalue that's derived from a function's upvalue list. Selected via index.debug.tracebackReturns a string with a traceback of the call stack. The optional message string is appended at the beginning of the traceback.