I'm making available my Debugging Toolkit, which I've used for the last month in my own development. It provides some basic debugging tools:
- strict.lua: The standard script from the Lua distribution that detects undeclared global variables (usually typos).
- Require.lua: A replacement for the standard require that provides the ability to reload all files and to define a search path for loading .lua files from shared directories.
- debugscript.lrdevplugin: Provides quick, easy loading and reloading of scripts (whether or not they're part of a plugin), error trapping, and automatic display of the offending source line in your favorite text editor.
- Debug.lua: A standalone debugging module that provides an interactive debugger with breakpoints, stack traces, and evaluation of expressions; a "pretty printer" that nicely formats any Lua value (including nested and circular tables); some logging tools; and a rudimentary elapsed-time profiler for functions.
Each of these components can be used standalone, without the others.
Download it from:
Feedback appreciated, though I may not be able to act on it.
Also, depending on whether people find this useful and how Rob's efforts proceeds, we can consider whether to merge this in with that.
I played very briefly with the debugging toolkit - thank you for that. - I hope we'll soon be conferring about how to best incorporate that into "Our" repository - the common source code in svn at https://www.assembla.com/spaces/lrdevplugin/