Debug

From GiderosMobile
Revision as of 14:20, 23 August 2018 by Hgy29 (talk | contribs)

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.

Methods

debug.debug Template:Enters interactive debug mode, line with only "cont" terminates
debug.gethook Template:Returns current hook function, hook mask, hook count
debug.getinfo Template:Returns table with information about a function
debug.getlocal Template:Returns name and value of local variable with index local at stack level
debug.getupvalue Template:Returns name and value of upvalue with index up of function func
debug.sethook {{sets given function as a hook, mask="[crl]"}}
debug.setlocal Template:Sets local variable with index local at stack level with value
debug.settypemt Template:Set meta table type
debug.setupvalue Template:Sets upvalue with index up of function func with value
debug.traceback Template:Returns a string with a traceback of the call stack

Events

Constants