package lua
Available on lua
staticdebug():VoidEnters an interactive mode with the user, running each string that the user enters. Using simple commands and other debug facilities, the user can inspect global and local variables, change their values, evaluate expressions, and so on. A line containing only the word cont finishes this function, so that the caller continues its execution.
Note that commands for Debug.debug are not lexically nested within any function, and so have no direct access to local variables.
staticgethook(thread:Thread):FunctionReturns the current hook settings of the thread, as three values: the current hook function, the current hook mask, and the current hook count (as set by the Debug.sethook function).
staticgetinfo(stackLevel:Int):DebugInfoReturns a table with information about a function.
staticgetlocal(stackLevel:Int, idx:Int):DynamicThis function returns the name and the value of the local variable with index local of the function at level level of the stack.
staticgetmetatable(value:AnyTable):AnyTableReturns the metatable of the given value or null if it does not have a metatable.
staticgetregistry():AnyTableReturns the registry table.
staticgetupvalue(f:Function, up:Int):DynamicThis function returns the name and the value of the upvalue with index up of the function f. The function returns null if there is no upvalue with the given index.
staticgetuservalue(val:Dynamic):DynamicReturns the Lua value associated to val. If val is not a UserData, returns null.
staticsethook(?fun:Function, ?monitor:String):VoidSets the given function as a hook. When called without arguments, Debug.sethook turns off the hook.
staticsetlocal(stackLevel:Int, varName:String, value:Dynamic):VoidThis function assigns the value value to the local variable with index local of the function at level level of the stack. Call getinfo to check whether the level is valid.
staticsetmetatable(value:AnyTable, table:AnyTable):VoidSets the metatable for the given value to the given table (can be null).
staticsetupvalue(f:Function, up:Int, val:Dynamic):VoidThis function assigns the value value to the upvalue with index up of the function f. The function returns null if there is no upvalue with the given index. Otherwise, it returns the name of the upvalue.
staticsetuservalue(udata:Dynamic, val:Dynamic):VoidSets the given value as the Lua value associated to the given udata. udata must be a full UserData.
statictraceback(?thread:Thread, ?message:String, ?level:Int):StringReturns a string with a traceback of the call stack.
Parameters:
message |
(optional) is appended at the beginning of the traceback. |
|---|---|
level |
(optional) tells at which level to start the traceback. default is |
staticupvalueid(f:Function, n:Int):DynamicReturns a unique identifier (as a light userdata) for the upvalue numbered n from the given function f.
staticupvaluejoin(f1:Function, n1:Int, f2:Function, n2:Int):VoidMake the n1-th upvalue of the Lua closure f1 refer to the n2-th upvalue of the Lua closure f2.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/lua/Debug.html