[Top][All Lists]

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

Re: guile debugging (was: Missing ice-9 debugger breakpoints)

From: Neil Jerram
Subject: Re: guile debugging (was: Missing ice-9 debugger breakpoints)
Date: Sat, 23 Sep 2006 08:27:26 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Carlos Pita <address@hidden> writes:

>> > Would guile-debugging be eventually merged with
>> guile core?
>> Yes, this is in progress right now.  I don't think
>> it will be in time
>> for the next stable release (1.8.1), though.
> Great! I've tried the CVS version, but throws some
> errors when debug-trapping (quoted below),

I'll reply to your other email about this.

> By the way, isn't there a simple way to
> invoke the debugger from an arbitrary point of code?

Try something like this:

    (debug-stack (make-stack #t)

(You can of course put this code into a utility procedure called
`debug-here', for more convenience.)

Does this do what you are looking for?

> (debug) requires that an error have happened. I do a
> lot of that kind of debugging when programming python,
> entering the interactive debugger by simply inserting
> an invocation to it in a relevant point of my code:
> pdb.set_trace().

Interesting; from the name, this sounds like it is creating a
breakpoint at the current position, which is not quite the same as
calling the debugger directly (as debug-stack does).

I used to have something like this in guile-debugging.  There was a
`trap-here' macro (which is still documented, wrongly) and before that
a `##' read extension.  I removed them because I thought having to
modify the code was undesirable.  Perhaps I should put one of these

> know). Please don't misunderstand me, I don't mean
> that all the trap and breakpoint stuff is pointless,
> your work looks very promising and I crave for it
> being integrated to the next stable release.

Understood! :-)

> Just that
> it seems so easy to extend (debug) or smoething
> similar to be invoked from arbitrary places... (even
> if the interactive debugger didn't provide a stepper,
> it would still be pretty useful).

Yes, agreed.

> Perhaps a macro that
> simple replaces itself by (/ 1 0) will do the trick
> :).

Well it might do, but only if used together with `debug-on-error' in
(ice-9 debugger), and debug-on-error just does the debug-stack call
that I mentioned above.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]