lua-users home
lua-l archive

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



remdebug - I haven't tried using it, but it looks like it requires some extra setup, being remote and  requiring a couple of libraries.  The front-end for it is currently just text, but I talked briefly with the author, and they said they're thinking about doing a LuaEclipse front-end, which would be mucho coolo.

vslua - this would be good, if it were free/cheap, and it actually worked.  If you want to see a stack trace, you have to pony up $500.  I've gotten it to work on simple examples, but I can't run it without binary-crashing in our codebase. 

ldb - Like I was saying in an earlier email, it's very nifty.  It's brain-dead easy to use: you just require the ldb file, and say 'ldb' wherever you want to break.  You can also make it step through code in your editor (UltraEdit in my case).

The closest things I know to unified debugging are:
1.  When going up the lua stack, you can pass through c functions to more lua functions, but can't see much detail about the c functions.
2.  vslua let's you set breaks in both lua and cpp code, and hop between them.  There are still separate stacks for lua and cpp, and no stepping in and out between them.

In practice, I've found it actually works quite well to debug only in the lua layer.  This forces you to sort of draw a wrapper around your cpp code.  When something goes boom in the cpp layer, I, of course, have to go back to Visual Studio and fix it.  But I make sure to focus on making a good interface between them.

On 6/18/07, Enno Rehling <enno.rehling@gmail.com> wrote:
I haven't been following lua developments for a while, and been content
with print() debugging all this time, but as my projects grow in
complexity, I wish for some better tool support. And in lieu of
research, I thought I'd ask - I've seen remdebug, vslua and ldb
mentioned, and it looks like debugging is worked on by several
independent projects. Help me, please, which one is useful?

Ideally, I would of course like to have a completely integrated
solution. My main C code calls Lua extensions, which then call C helper
functions again, which occasionally call back into Lua - so my callstack
occasionally looks pretty wild. I doubt that any debugger will show me
mixed lua/C callstacks (wouldn't that be sweet?) with the same comfort I
get from my regular C debuggers, but can I get any lua debugger support
at all for this sort of program? And can I get it both for Win32 and
Linux programming?

Enno.
--
The reasonable man adapts himself to the world; the unreasonable man
persists in trying to adapt the world to himself. Therefore, all
progress depends on the unreasonable man.
- George Bernard Shaw