mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] help with tracing


From: Matt Birkholz
Subject: Re: [MIT-Scheme-devel] help with tracing
Date: Sun, 16 Nov 2014 11:59:55 -0700

> From: Catonano <address@hidden>
> Date: Sat, 15 Nov 2014 16:41:07 +0100
> 
> [...]
> 
> How do I debug my own code ?
> 
> If I call (debug (my-function my-argument)) the debugger says that
> the object passed as argument to debug is not a condition or a
> continuation.
> 
> It proposes a wonderful view (with the break up in subproblems) of
> the system code, but as for my function it only shows what my
> function returned.

The DEBUG procedure inspects a continuation (the stack).  My-function
does not return a continuation, so you get an error.  At that point,
typing (DEBUG) inspects the continuation for that error, which is to
return from make-initial-dstate to the (let ((dstate |###|))...) form
in debug-internal.  That is what debug is showing you.

> I would love to see the same break up in subproblems on my own code.
> 
> How can I achieve that ?
> 
> Thanks
> 
> P.S. I also tried with calling bkpt in the middle of my code but in that case
> the debugger shows a window that is not as interactive as the one shown when
> calling debug directly.

You are seeing a breakpoint REPL prompt, similar to the error REPL
prompt.  Type

    (debug)

to inspect the breakpoint's continuation.  That should show you what
will happen when you continue from the breakpoint.  Clear as mud?



reply via email to

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