Difference between revisions of "Debug"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === The debug library does not give you a debugger for Lua, but it offers...")
 
 
(14 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
<languages />
'''Available since:''' Gideros 2011.6<br/>
+
<!-- GIDEROSOBJ:debug -->
=== Description ===
+
'''<translate>Supported platforms</translate>:''' [[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/>
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.{|-
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
| style="width: 50%;"|
+
=== <translate>Description</translate> ===
=== Methods ===
+
<translate>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.</translate>
| style="width: 50%;"|
+
{|-
=== Events ===
+
| style="width: 50%; vertical-align:top;"|
=== Constants ===
+
=== <translate>Methods</translate> ===
 +
[[Special:MyLanguage/debug.debug|debug.debug]] ''<translate>enters interactive debug mode, line with only "cont" terminates</translate>''<br/><!-- GIDEROSMTD:debug.debug() enters interactive debug mode, line with only "cont" terminates -->
 +
[[Special:MyLanguage/debug.gethook|debug.gethook]] ''<translate>returns current hook function, hook mask, hook count</translate>''<br/><!-- GIDEROSMTD:debug.gethook() returns current hook function, hook mask, hook count -->
 +
[[Special:MyLanguage/debug.getinfo|debug.getinfo]] ''<translate>returns table with information about a function</translate>''<br/><!-- GIDEROSMTD:debug.getinfo(function,what) returns table with information about a function -->
 +
[[Special:MyLanguage/debug.getlocal|debug.getlocal]] ''<translate>returns name and value of local variable with index local at stack level</translate>''<br/><!-- GIDEROSMTD:debug.getlocal(level,local) returns name and value of local variable with index local at stack level -->
 +
[[Special:MyLanguage/debug.getupvalue|debug.getupvalue]] ''<translate>returns name and value of upvalue with index up of function func</translate>''<br/><!-- GIDEROSMTD:debug.getupvalue(func,up) returns name and value of upvalue with index up of function func -->
 +
[[Special:MyLanguage/debug.sethook|debug.sethook]] ''<translate>sets given function as a hook, mask="[crl]"</translate>''<br/><!-- GIDEROSMTD:debug.sethook(hook,mask,count) sets given function as a hook, mask="[crl]" -->
 +
[[Special:MyLanguage/debug.setlocal|debug.setlocal]] ''<translate>sets local variable with index local at stack level with value</translate>''<br/><!-- GIDEROSMTD:debug.setlocal(level,local,value) sets local variable with index local at stack level with value -->
 +
[[Special:MyLanguage/debug.settypemt|debug.settypemt]] ''<translate>Set meta table type</translate>''<br/><!-- GIDEROSMTD:debug.settypemt() Set meta table type -->
 +
[[Special:MyLanguage/debug.setupvalue|debug.setupvalue]] ''<translate>sets upvalue with index up of function func with value</translate>''<br/><!-- GIDEROSMTD:debug.setupvalue(func,up,value) sets upvalue with index up of function func with value -->
 +
[[Special:MyLanguage/debug.traceback|debug.traceback]] ''<translate>returns a string with a traceback of the call stack</translate>''<br/><!-- GIDEROSMTD:debug.traceback(message,level) returns a string with a traceback of the call stack -->
 +
| style="width: 50%; vertical-align:top;"|
 +
=== <translate>Events</translate> ===
 +
=== <translate>Constants</translate> ===
 
|}
 
|}
 +
 +
{{GIDEROS IMPORTANT LINKS}}

Latest revision as of 16:06, 30 January 2020


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
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.

Methods

debug.debug enters interactive debug mode, line with only "cont" terminates
debug.gethook returns current hook function, hook mask, hook count
debug.getinfo returns table with information about a function
debug.getlocal 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
debug.sethook sets given function as a hook, mask="[crl]"
debug.setlocal sets local variable with index local at stack level with value
debug.settypemt Set meta table type
debug.setupvalue sets upvalue with index up of function func with value
debug.traceback returns a string with a traceback of the call stack

Events

Constants