From: Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
To: "Thompson\, David" <dthompson2@worcester.edu>
Cc: Carlos Pita <carlosjosepita@gmail.com>, Guile User <guile-user@gnu.org>
Subject: Re: Entering the interactive debugger
Date: Tue, 02 Sep 2014 22:14:17 +0200 [thread overview]
Message-ID: <877g1lhjae.fsf@taylan.uni.cx> (raw)
In-Reply-To: <CAJ=RwfaBjssxqdO_Z2-oyQGJegn0FCrv8AK2NVQEg9HeoN9cUQ@mail.gmail.com> (David Thompson's message of "Tue, 2 Sep 2014 15:20:12 -0400")
"Thompson, David" <dthompson2@worcester.edu> writes:
> On Tue, Sep 2, 2014 at 3:03 PM, Carlos Pita <carlosjosepita@gmail.com> wrote:
>> Hi all, although I have some experience with lisps, I'm still new to
>> guile and I'm having some trouble figuring out how to invoke the
>> interactive debugger at some arbitrary point in my code. Something like:
>>
>> ; code here
>> (debug)
>> ; more code here
>>
>> The closer solution I could find in the manual is:
>>
>> add-trap-at-source-location! file user-line
>>
>> Any suggestion?
>
> I don't know of any straightforward solution, but I would also like
> such a feature. I don't think it would be too difficult to write a
> 'debug' procedure using the 'debug-trap-handler' procedure in (system
> repl error-handling) as inspiration. Basically, you'd need to capture
> the current stack and spawn a new REPL in debug mode that uses that
> stack.
Couldn't you just use (error)? It will enter the debugger if run from
the REPL or otherwise when debugging is enabled on the VM or so (I don't
know the details), though it will abort if run stand-alone; not sure if
that's enough for your purposes.
Taylan
next prev parent reply other threads:[~2014-09-02 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 19:03 Entering the interactive debugger Carlos Pita
2014-09-02 19:20 ` Thompson, David
2014-09-02 19:57 ` Thompson, David
2014-09-02 20:14 ` Taylan Ulrich Bayirli/Kammer [this message]
2014-09-03 2:08 ` Carlos Pita
2014-09-05 13:57 ` mhw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g1lhjae.fsf@taylan.uni.cx \
--to=taylanbayirli@gmail.com \
--cc=carlosjosepita@gmail.com \
--cc=dthompson2@worcester.edu \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).