Difference between revisions of "Debug"
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
<!-- GIDEROSOBJ:debug --> | <!-- GIDEROSOBJ:debug --> | ||
− | ''' | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> |
− | ''' | + | '''Available since:''' Gideros 2011.6<br/> |
− | === | + | |
− | + | === Description === | |
+ | The debug library does not give you a debugger for Lua, but it offers all the primitives that you need for writing a debugger for Lua. For performance reasons, the official interface to these primitives is through the C API. The debug library in Lua is a way to access these functions directly within Lua code. This library declares all its functions inside the debug table. | ||
+ | |||
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | === Methods === |
− | [[ | + | [[debug.debug]] ''enters interactive debug mode, line with only "cont" terminates''<br/><!--GIDEROSMTD:debug.debug() enters interactive debug mode, line with only "cont" terminates--> |
− | [[ | + | [[debug.gethook]] ''returns current hook function, hook mask, hook count''<br/><!--GIDEROSMTD:debug.gethook() returns current hook function, hook mask, hook count--> |
− | [[ | + | [[debug.getinfo]] ''returns table with information about a function''<br/><!--GIDEROSMTD:debug.getinfo(function,what) returns table with information about a function--> |
− | [[ | + | [[debug.getlocal]] ''returns name and value of local variable with index local at stack level''<br/><!--GIDEROSMTD:debug.getlocal(level,local) returns name and value of local variable with index local at stack level--> |
− | [[ | + | [[debug.getupvalue]] ''returns name and value of upvalue with index up of function func''<br/><!--GIDEROSMTD:debug.getupvalue(func,up) returns name and value of upvalue with index up of function func--> |
− | [[ | + | [[debug.sethook]] ''sets given function as a hook, mask="[crl]"''<br/><!--GIDEROSMTD:debug.sethook(hook,mask,count) sets given function as a hook, mask="[crl]"--> |
− | [[ | + | [[debug.setlocal]] ''sets local variable with index local at stack level with value''<br/><!--GIDEROSMTD:debug.setlocal(level,local,value) sets local variable with index local at stack level with value--> |
− | [[ | + | [[debug.settypemt]] ''Set meta table type''<br/><!--GIDEROSMTD:debug.settypemt() Set meta table type--> |
− | [[ | + | [[debug.setupvalue]] ''sets upvalue with index up of function func with value''<br/><!--GIDEROSMTD:debug.setupvalue(func,up,value) sets upvalue with index up of function func with value--> |
− | [[ | + | [[debug.traceback]] ''returns a string with a traceback of the call stack''<br/><!--GIDEROSMTD:debug.traceback(message,level) returns a string with a traceback of the call stack--> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | === Events === |
− | === | + | === Constants === |
|} | |} | ||
+ | |||
+ | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 22:33, 6 November 2024
Supported platforms:
Available since: Gideros 2011.6
Description
The debug library does not give you a debugger for Lua, but it offers all the primitives that you need for writing a debugger for Lua. For performance reasons, the official interface to these primitives is through the C API. The debug library in Lua is a way to access these functions directly within Lua code. This library declares all its functions inside the debug table.
Methodsdebug.debug enters interactive debug mode, line with only "cont" terminates |
EventsConstants |