From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Re: Debug setup in emacs Date: Tue, 8 Sep 2020 08:45:15 +0200 Message-ID: References: <874kod3ygp.fsf@posteo.net> <87v9gpicf4.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20189"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.10.0 Cc: Guile User To: Fredrik Salomonsson Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Sep 08 08:45:36 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFXNn-00056P-Mv for guile-user@m.gmane-mx.org; Tue, 08 Sep 2020 08:45:35 +0200 Original-Received: from localhost ([::1]:59836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFXNm-0007TK-L3 for guile-user@m.gmane-mx.org; Tue, 08 Sep 2020 02:45:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFXNc-0007TA-3r for guile-user@gnu.org; Tue, 08 Sep 2020 02:45:24 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:35509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFXNZ-0007FB-4v for guile-user@gnu.org; Tue, 08 Sep 2020 02:45:23 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id F100D2400FD for ; Tue, 8 Sep 2020 08:45:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1599547517; bh=DPisgGTyOBoU4GSO+iTS+EY33Cv6RNzsHzwbYjJVdDk=; h=Subject:To:Cc:From:Date:From; b=dEKZ0QIKjLl0UxxicOimz90m4uYb9oZD1kn5t1G9iMLo7dkYJADDJm3R0IBRu/TqI Eftzt/obmg8DtvMCuyS+eNtCFZJSdJVYYPEf34E8NFoSK3XeeNrn0WQIBNc5fQHa1m 4L9KZCKwdIfQZya1XmoJYcm0Eel5yEtVxEKB0zCodZjscfTzWPSj5XxRhj2iN+k2tK HuW82XO73hgQxUMq853AsCSZEl7M41W//dabbsIjbbLsHs4PEjtxWvDrqhQhsVK44S Z2v+z9qwuYKaiCq/jVjRYUnfoMcOUndFA+QzIuHsKv9aAHlUJpdtWj6dxklkapfuJQ RnTM51TKZa0hg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Blwd82xl3z9rxf; Tue, 8 Sep 2020 08:45:16 +0200 (CEST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:45:17 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -38 X-Spam_score: -3.9 X-Spam_bar: --- X-Spam_report: (-3.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.825, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16885 Archived-At: Hi Frederik! I usually find myself using (display (simple-format #f "blablabla: ~a\n some-binding)) or a custom procedure wrapping it. At some point it becomes too much and I switch to the REPL and trying things in there, if the setup or situation is not too hard to reproduce. Also used (pk ...) sometimes, when I am not sure an expression is ever evaluated. If this fails me, I sometimes try to think about all the custom procedures involved and start writing tests. If I am too lazy to do that, I find myself thinking about the problem real hard and then usually facepalming about my own silly mistakes. If I still don't know what's going on, I might ask on the mailing list for help. Regards, Zelphir On 08.09.20 08:15, Catonano wrote: > Hi Fredrik, > > Il giorno lun 7 set 2020 alle ore 22:01 Fredrik Salomonsson < > plattfot@posteo.net> ha scritto: > >> Thank you for pointing this out to me and the links to the blog posts. >> >> > My pleasure ☺ > > > And as a follup question. What do people use when debugging guile code? >> > I don't debug much, personally > > I know some people have been using the "pk" procedure > > It displays the arguments you pass to it in the terminal and returns the > same arguments, untouched > > So you can sprinkle it all around > > I've had my issues with it though > > I never tried with (format #f) as you suggested > > Also, there's the "trace tool (try "(help) in the repl to read about it) > > This is all I know > > Maybe someone else can chime in, here > > Also, I'm wondering if this issue doesn't deserve a thread on its own 😶 -- repositories: https://notabug.org/ZelphirKaltstahl