lua debugging

Hi there !

Long time since my last post, glad to see patches making it to the next release ^^
But, I still need a few features to work in order to use premake in my company (we have a pretty big code base, lots of dependencies, and more importantly, we need to support at least win32, macos, ios, android, psp2, ps3 and 3ds ^^)

Anyway, I have a bit of spare time, and I'm trying to fix a few things, but I'm not really familiar with lua, and I have a really hard time figuring out "what the heck this variable contains ????"

Is there any decent debugger out there that can be used with premake, that can be used to set breakpoints, inspect variable contents and such ??

Thanks in advance for any help !

To be honest, I haven't looked in a long time. I use a text editor (BBEdit on Mac, Visual Studio w/Lua extensions on Windows). The unit tests do a good job of isolating problems so I haven't felt much of a need for an interactive debugger. But I suppose I might feel differently if I were coming to the project cold.

If you find anything, do let us know.

There is some work coming in the near term on better platform/architecture support.

I tried a number of different Lua editor but found the only one that worked was Decoda. They even have a video for setting it up. Free for 30 days, and then $50 for indie developers or $400 for non-indie.

LuaEdit also held some promise, but after adding the code required to let its debugger work there was always an exception thrown when using premake. I am just learning Lua so figuring out what went wrong is a bit beyond me.

Icesaber40k: when in doubt what's going on, don't forget about debug.traceback().

Hi,

@Icesaber40k: Yep, I already tested Decoda, and it worked like a charm with premake : I could fully debug, set breakpoints, inspect everything, browse through the callstack, etc. But unfortunately, I didn't have much time to play with it, and now the evaluation period is over :(

@annulen: about debug.traceback(), is it part of lua, or an addition of premake ? Is there some other debugging functionalities ? The most important (for me at least) would be a sort of "debug.printcontent(anything)" which would print in a human readable form the parameter !

>about debug.traceback(), is it part of lua, or an addition of premake ?

Part of Lua, see reference manual for more info.

>The most important (for me at least) would be a sort of "debug.printcontent(anything)" which would print in a human readable form the parameter !

Google "recursive print table lua" or similar

You can find other debugging facilities in "debug" package of Lua. It allows to set breakpoints, access local variables and upvalues of current function or any function on other stack levels.

Another vote for Decoda guys, it is Turbo, absolutely Turbo.

Anonymous: It doesn't support neither Linux nor Mac OS X. For me, for example, it's absolutely unacceptable.

@Anonymous: I do need to check out Decoda. I could have used a proper debugger this week. Thanks for the feedback!