guile-user
[Top][All Lists]
Advanced

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

Re: in-line trap ?


From: Matt Wette
Subject: Re: in-line trap ?
Date: Wed, 4 Jan 2017 17:02:12 -0800

> On Jan 3, 2017, at 2:15 AM, Ludovic Courtès <address@hidden> wrote:
> 
> Hello!
> 
> Matt Wette <address@hidden> skribis:
> 
>> I have been going through the debugging infrastructure and can’t figure out 
>> how to code in a trap.  I would like something like
>> 
>> (define (xxx) … (if cond (trap-here)) ….)
>> 
>> that would dump me into the interactive debugger when I hit that condition.  
>> Any help on achieving this is will be appreciated.
> 
> Something along these lines on 2.0:
> 
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> ,use(system repl repl)
> scheme@(guile-user)> ,use(system repl debug)
> scheme@(guile-user)> (start-repl #:debug (make-debug (stack->vector 
> (make-stack #t)) 0 "trap!" #t))
> scheme@(guile-user) [1]> 
> --8<---------------cut here---------------end--------------->8---
> 
> In 2.1, ‘make-debug’ does not take this last #t argument.

Thanks for the lead.  Though this does not seem to be working, I will try to 
use this as a starter after I finish my current task (on nyacc).

Matt
 


reply via email to

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