From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Stack traces Date: Fri, 17 Feb 2017 16:13:45 -0800 Message-ID: References: <87h93wto3y.fsf_-_@gnu.org> <87mvdn4gam.fsf@dustycloud.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487376863 1222 195.159.176.226 (18 Feb 2017 00:14:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 00:14:23 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Feb 18 01:14:18 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cesfF-0007wu-Sv for guile-user@m.gmane.org; Sat, 18 Feb 2017 01:14:14 +0100 Original-Received: from localhost ([::1]:56561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cesfL-00036T-BG for guile-user@m.gmane.org; Fri, 17 Feb 2017 19:14:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cesew-00036A-Ix for guile-user@gnu.org; Fri, 17 Feb 2017 19:13:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceses-0001eX-J3 for guile-user@gnu.org; Fri, 17 Feb 2017 19:13:54 -0500 Original-Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:33475) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceses-0001e0-93 for guile-user@gnu.org; Fri, 17 Feb 2017 19:13:50 -0500 Original-Received: by mail-pg0-x230.google.com with SMTP id y6so15721469pgy.0 for ; Fri, 17 Feb 2017 16:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=ow7gy9iU7gnJcXs37/eNuiWwR0qxPyC+tizGi//TvZc=; b=czRTNjZx+iw6grzAor7sXWT9MOnCSdZo9swdIoaww2w8DX6gYkRJ+eTxeW9GWtkymj ZusoC7zh11AFCFKhQ0G2kcSQT6thsN80iCFsjLrg8+9rIS9m8weY/QZ976udpX/Cy3iz 3fMROxtE7lQzx7IzeaKP47/8FrS2Onid+bC1f6jvLTRb3fbAZSZUaWz4KgHfbaL22MQK /JcAPzE63clmF23l2qmnkAXPKuOndWF7+2EP3G6OkVfr4GZGHUHiggcnKL5n90zTv/Zl olABWFNCOxqgHCL1OQ99hy7ICAmaQx579eyapdf+skBfN7JFjsb2phDL1yGdGLTpher8 nrow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=ow7gy9iU7gnJcXs37/eNuiWwR0qxPyC+tizGi//TvZc=; b=NVQu7jaNVOCA0m2JHSPIXqEDVblg222wq4kYa5+4dbz1VV71I+fkpZn/oqWYMInKzK KS6/Qtvq4O/A4Y5DUqqO1eV6Z44R7Oyj2VLQvUESzD6gCKnb5yoQLYjWpCN7aKhbeEN6 40OWrskDJCRNlQZuM2EmRyevsZzJgbG857/MVy34+sUidLbUcj0un1+rQXdi4wLGbSBh Nvszig7PKHpI1gsygvQhyGzBcKWhMv91cfDYzIzUo/R+XgeUV3Qe/7HyH/tyGfYpr2rR 1I0TNZz2cFS/rGb9dIuCpG40JhLZ7wI0P/lmerusZbqJH9yF3lmynhm9qIJqH1nlikGT JHKQ== X-Gm-Message-State: AMke39nGXbCKAJ7DD5pszP7wzTDUCYKD/3jFctKuX5atHvAg+7OR0diHQOVSZRc/Mdyiyg== X-Received: by 10.84.196.131 with SMTP id l3mr14996276pld.150.1487376828648; Fri, 17 Feb 2017 16:13:48 -0800 (PST) Original-Received: from nautilus.championbroadband.com (216-165-246-244.championbroadband.com. [216.165.246.244]) by smtp.gmail.com with ESMTPSA id i15sm422765pfj.0.2017.02.17.16.13.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Feb 2017 16:13:47 -0800 (PST) In-Reply-To: <87mvdn4gam.fsf@dustycloud.org> X-Mailer: Apple Mail (2.3259) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13283 Archived-At: > On Feb 15, 2017, at 7:36 AM, Christopher Allan Webber = wrote: >=20 > One thing that we see requested a lot is how to do the equivalent of: >=20 > import pdb > pdb.set_trace() >=20 > in python, just dumping something to "trigger" the debugger somewhere. > I seem to remember getting some arcane code to do something similar, = but > maybe we can just have a simple invocation that people could put > anywhere. (Amirouche has been raising this one also I think.) >=20 I am playing with this. It does dump me into the debugger but the = interaction is not wonderful (like pdb.set_trace()).=20 However, this is context for working in that direction (i.e., = pdb.set_trace()): mwette$ cat trapper.scm=20 (use-modules (system repl repl)) (use-modules (system repl debug)) (define-syntax-rule (trap-here) (start-repl #:debug (make-debug (stack->vector (make-stack #t)) 0 "trap!" #t))) (define (foo) (let iter ((sum 0) (vals '(1 2 3 5 8 2))) (trap-here) (if (null? vals) sum (iter (+ sum (car vals)) (cdr vals))))) (foo) mwette$ guile GNU Guile 2.0.13 [=E2=80=A6] scheme@(guile-user)> (load "trapper.scm") [=E2=80=A6] scheme@(guile-user) [1]> ,bt [=E2=80=A6] In /Users/mwette/proj/scheme/myproj/potluck/trapper.scm: 10:4 1 (foo) In unknown file: 0 (make-stack #t) scheme@(guile-user) [1]>=20