4.9 – The Debug Interface

Lua has no built-in debugging facilities. Instead, it offers a special interface by means of functions and hooks. This interface allows the construction of different kinds of debuggers, profilers, and other tools that need "inside information" from the interpreter.

lua_Debug

lua_Debug typedef struct lua_Debug { int event; const char *name; /* (n) */ const char *namewhat; /* (n) */ const char

2017-02-21 04:12:59
lua_getlocal

lua_getlocal[-0, +(0|1), –] const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); Gets information

2017-02-21 04:13:11
lua_gethookcount

lua_gethookcount[-0, +0, –] int lua_gethookcount (lua_State *L); Returns the current hook count.

2017-02-21 04:13:07
lua_gethook

lua_gethook[-0, +0, –] lua_Hook lua_gethook (lua_State *L); Returns the current hook function.

2017-02-21 04:13:06
lua_gethookmask

lua_gethookmask[-0, +0, –] int lua_gethookmask (lua_State *L); Returns the current hook mask.

2017-02-21 04:13:08
lua_setlocal

lua_setlocal[-(0|1), +0, –] const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); Sets the

2017-02-21 04:14:26
lua_getinfo

lua_getinfo[-(0|1), +(0|1|2), e] int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);

2017-02-21 04:13:10
lua_upvalueid

lua_upvalueid[-0, +0, –] void *lua_upvalueid (lua_State *L, int funcindex, int n); Returns a unique identifier

2017-02-21 04:14:50
lua_getupvalue

lua_getupvalue[-0, +(0|1), –] const char *lua_getupvalue (lua_State *L, int funcindex, int n); Gets information

2017-02-21 04:13:16
lua_setupvalue

lua_setupvalue[-(0|1), +0, –] const char *lua_setupvalue (lua_State *L, int funcindex, int n); Sets the

2017-02-21 04:14:30