lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Jose,

> I would like to know what tools do you use to debug Lua code.
> Only inserting some logs isn't  enough, most of the time we need to trace
> functions calls, inspect variables contents, and so on.
> Also, is there any way for the Lua compiler to check if some variable wasn't
> initilized ('declared')?

If you are looking for all this functionality integrated into one
package, then take a look at ZeroBrane Studio
( It provides a
debugger with stack trace (which also shows local/upvalue values for
each stack frame, including tables), tracing and stepping through Lua
functions, variable/expression watch, interactive console with
integrated pretty printing and a static analyzer (based on already
mentioned lua-inspect).

If you need just the debugger, then check MobDebug
(, which allows you to access
most of these functions from a command line. ZeroBrane Studion is
using MobDebug for all its debugging needs.