debug.getuservalue()

debug.getuservalue (u) Returns the Lua value associated to u. If u is not a full userdata, returns nil.

debug.getupvalue()

debug.getupvalue (f, up) This function returns the name and the value of the upvalue with index up of the function f. The function returns nil if there is no upvalue with the given index. Variable names starting with '(' (open parenthesis) represent variables with no known names (variables from chunks saved without debug information).

debug.getregistry()

debug.getregistry () Returns the registry table (see §4.5).

debug.getmetatable()

debug.getmetatable (value) Returns the metatable of the given value or nil if it does not have a metatable.

debug.getlocal()

debug.getlocal ([thread,] f, local) This function returns the name and the value of the local variable with index local of the function at level f of the stack. This function accesses not only explicit local variables, but also parameters, temporaries, etc. The first parameter or local variable has index 1, and so on, following the order that they are declared in the code, counting only the variables that are active in the current scope of the function. Negative indices refer to vararg para

debug.getinfo()

debug.getinfo ([thread,] f [, what]) Returns a table with information about a function. You can give the function directly or you can give a number as the value of f, which means the function running at level f of the call stack of the given thread: level 0 is the current function (getinfo itself); level 1 is the function that called getinfo (except for tail calls, which do not count on the stack); and so on. If f is a number larger than the number of active functions, then getinfo returns ni

debug.gethook()

debug.gethook ([thread]) Returns the current hook settings of the thread, as three values: the current hook function, the current hook mask, and the current hook count (as set by the debug.sethook function).

debug.debug()

debug.debug () Enters an interactive mode with the user, running each string that the user enters. Using simple commands and other debug facilities, the user can inspect global and local variables, change their values, evaluate expressions, and so on. A line containing only the word cont finishes this function, so that the caller continues its execution. Note that commands for debug.debug are not lexically nested within any function and so have no direct access to local variables.

coroutine.yield()

coroutine.yield (···) Suspends the execution of the calling coroutine. Any arguments to yield are passed as extra results to resume.

coroutine.wrap()

coroutine.wrap (f) Creates a new coroutine, with body f. f must be a function. Returns a function that resumes the coroutine each time it is called. Any arguments passed to the function behave as the extra arguments to resume. Returns the same values returned by resume, except the first boolean. In case of error, propagates the error.