Difference between revisions of "Debug"
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Supported platforms:''' android | + | <!-- 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/> | '''Available since:''' Gideros 2011.6<br/> | ||
+ | |||
=== Description === | === 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%;"| | + | | style="width: 50%; vertical-align:top;"| |
=== Methods === | === Methods === | ||
− | [[debug.debug]] | + | [[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]] | + | [[debug.gethook]] ''returns current hook function, hook mask, hook count''<br/><!--GIDEROSMTD:debug.gethook() returns current hook function, hook mask, hook count--> |
− | [[debug.getinfo]] | + | [[debug.getinfo]] ''returns table with information about a function''<br/><!--GIDEROSMTD:debug.getinfo(function,what) returns table with information about a function--> |
− | [[debug.getlocal]] | + | [[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]] | + | [[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]] | + | [[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]] | + | [[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]] | + | [[debug.settypemt]] ''Set meta table type''<br/><!--GIDEROSMTD:debug.settypemt() Set meta table type--> |
− | [[debug.setupvalue]] | + | [[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]] | + | [[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%;"| | + | | style="width: 50%; vertical-align:top;"| |
=== Events === | === Events === | ||
=== Constants === | === 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 |