lua-users home
lua-l archive

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


--- Rici Lake <lua@ricilake.net> wrote:

> Steve Heller wrote:
> > --- Rici Lake <lua@ricilake.net> 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
> >> them?
> >>
> >> 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
> >> week.
> >>
> >> 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
> >> do:
> >>    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.

Thanks. I'll download the latest version.

I also have another question: exactly how do I set a
breakpoint in a file? I've tried this:

b
d:/dev/atb/core/trunk/lib/atb/custom/bac_6m/filters/experian/acaps_ecbm_filter2.lua:18

and the same with the / changed to \. I don't get an
error message, but I also don't get a breakpoint at
that line.

> 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 :)