Module std.debug
Additions to the debug module
Functions
debug () | The global function debug is an abbreviation for debug.say (1, ...) |
say (n, ...) | Print a debugging message. |
trace (event) | Trace function calls. |
Tables
_DEBUG | To activate debugging set _DEBUG either to any true value (equivalent to {level = 1}), or as documented below. |
Functions
- debug ()
-
The global function debug is an abbreviation for
debug.say (1, ...)
See also:
- say (n, ...)
-
Print a debugging message.
Parameters:
- n debugging level, defaults to 1
- ... objects to print (as for print)
- trace (event)
-
Trace function calls.
Use as debug.sethook (trace, "cr"), which is done automatically
when _DEBUG.call is set.
Based on test/trace-calls.lua from the Lua distribution.
Parameters:
- event event causing the call