lua-users home
lua-l archive

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

Steve Heller wrote:
--- Rici Lake <> wrote:

2. How do I actually use breakpoints? I don't seem
to be able to get
them to do anything. I can set them, but then if I
do a "c" to
continue, they seem to be ignored. Also, if I call
"ldb()" to invoke
the debugger, then try to do "s" or "n", I get a
message "Not inside
breakpoint". Do you have an example of how to use

Yeah, I should have explained that better. The
documentation lags the
code a bit, but I'm trying to finish it all up in my
spare time this

Basically, the easiest way to use breakpoints is to
start the program
you're debugging with the ldb script included in the
distro. You just
   ldb myprog.lua #arguments if any

Maybe I'm just dense, but it doesn't look as though
arguments are being passed to "myprog.lua". I looked
at the code but didn't see exactly how that works. Do
I need a literal "#" in the line before the arguments,
or what?

They should be being passed in the 'arg' global, as usual.

I had forgotten that the Lua standalone passes arguments to
the chunk as well, available in ...

I've added this feature to ldb-break in CVS.

It does not yet handle lua-interpreter style option arguments
(-i -l etc.), and it would be really nice if it used readline
to do i/o. But it doesn't, yet :)