Difference between revisions of "Debug"
From GiderosMobile
Line 7: | Line 7: | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
− | [[debug.debug]] | + | [[debug.debug]] {{<translate>enters interactive debug mode, line with only "cont" terminates</translate>}}<br/> |
− | [[debug.gethook]] | + | [[debug.gethook]] {{<translate>returns current hook function, hook mask, hook count</translate>}}<br/> |
− | [[debug.getinfo]] | + | [[debug.getinfo]] {{<translate>returns table with information about a function</translate>}}<br/> |
− | [[debug.getlocal]] | + | [[debug.getlocal]] {{<translate>returns name and value of local variable with index local at stack level</translate>}}<br/> |
− | [[debug.getupvalue]] | + | [[debug.getupvalue]] {{<translate>returns name and value of upvalue with index up of function func</translate>}}<br/> |
− | [[debug.sethook]] | + | [[debug.sethook]] {{<translate>sets given function as a hook, mask="[crl]"</translate>}}<br/> |
− | [[debug.setlocal]] | + | [[debug.setlocal]] {{<translate>sets local variable with index local at stack level with value</translate>}}<br/> |
− | [[debug.settypemt]] | + | [[debug.settypemt]] {{<translate>Set meta table type</translate>}}<br/> |
− | [[debug.setupvalue]] | + | [[debug.setupvalue]] {{<translate>sets upvalue with index up of function func with value</translate>}}<br/> |
− | [[debug.traceback]] | + | [[debug.traceback]] {{<translate>returns a string with a traceback of the call stack</translate>}}<br/> |
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === | ||
=== Constants === | === Constants === | ||
|} | |} |
Revision as of 14:20, 23 August 2018
Supported platforms: android, ios, mac, pc
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.