debug


Adds to the existing debug module


To activate debugging set _DEBUG either to any true value
(equivalent to {level = 1}), or a table with the following members:


level: debugging level
call: do call trace debugging
std: do standard library debugging (run examples & test code)


say: Print a debugging message
  [n]: debugging level [1]
  ...: objects to print (as for print)


Expose say as global function `debug'


traceCall: Trace function calls
  event: event causing the call
Use: debug.sethook (trace, "cr"), as below
based on test/trace-calls.lua from the Lua distribution


Set hooks according to _DEBUG