How do you debug your Lua Code?

I posted a question about setting up Koneki (Eclipse) for debugging and got no response yet, I am using Sublime with the Corona plugin (Corona Studio) but the debugging experience is no the best, I can not expand tables or events to see all of their values, I’ve tried Lua Glider it’s nice but not the best editor I’ve used (based on Netbeans).

What editors/ide’s do you guys use? How are you debugging your lua code?

Sublime text, printing where necessary :slight_smile:

A while back I decided to put a point-and-click debugger in Outlaw, started working on it, and then decided not to bother. Just throw some print statements in the code and see what’s in there. :slight_smile: That’s how I do all my debugging and I doubt a “real” debugger would make me any more productive (yes, I have used full debuggers in other environments so I do know what I’m missing).

Or, try something like ZeroBrane Studio which has a debugger.

 Jay

Awesome! Thanks Paul, Legendary J.A. Whye is here, I bought both your courses on business app and game development (both of them great), I’ll take a look at Outlaw and print statements in general.

I would add, one thing that is really excellent is strict.lua. I got it from Sergey Lerg’s blog http://spiralcodestudio.com/corona-sdk-pro-tip-of-the-day-10/ I think he didn’t create it, but improved it.

What it does is look for globals that are created accidentally, so if you write something like:

local count counnt = 42

it picks this error up - the code is fine but it creates a global counnt rather than using the local. it has no effect on final builds though. It deals with the lua/javascript problem of accidental globals.

Really nice Paul, I will add this to my assets as well, thanks.

Sublime text, printing where necessary :slight_smile:

A while back I decided to put a point-and-click debugger in Outlaw, started working on it, and then decided not to bother. Just throw some print statements in the code and see what’s in there. :slight_smile: That’s how I do all my debugging and I doubt a “real” debugger would make me any more productive (yes, I have used full debuggers in other environments so I do know what I’m missing).

Or, try something like ZeroBrane Studio which has a debugger.

 Jay

Awesome! Thanks Paul, Legendary J.A. Whye is here, I bought both your courses on business app and game development (both of them great), I’ll take a look at Outlaw and print statements in general.

I would add, one thing that is really excellent is strict.lua. I got it from Sergey Lerg’s blog http://spiralcodestudio.com/corona-sdk-pro-tip-of-the-day-10/ I think he didn’t create it, but improved it.

What it does is look for globals that are created accidentally, so if you write something like:

local count counnt = 42

it picks this error up - the code is fine but it creates a global counnt rather than using the local. it has no effect on final builds though. It deals with the lua/javascript problem of accidental globals.

Really nice Paul, I will add this to my assets as well, thanks.