Utilities
Debug
Debug.inspect, dump, profile, logger and assertf.
Debug
Debug.inspect(value, depth = 3)
Returns a readable string for any value. Tables show their keys in sorted order, repeated tables are marked <cycle>, and tables deeper than depth are shown as {...}. Global alias: inspect.
Debug.dump(value, depth = 3)
Prints Debug.inspect(value, depth) to the console. Global alias: dump.
dump(mc.getPlayer())
Debug.profile(name, fn, ...)
Runs fn(...), prints [profile] name: N ms, and returns what fn returned. Errors inside fn are caught: the error message is returned instead of the results.
Debug.logger(name)
Returns a logger with info, warn and error functions. Lines are printed to the in-game console with [name] in front.
local log = Debug.logger("aura")
log.info("started")
log.error("no target")
Debug.assertf(condition, format, ...)
If the condition is false, raises an error with string.format(format, ...). Otherwise returns the condition.
For a console window with many more options, see rconsole.