From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: How to debug function that uses macros Date: Wed, 01 Mar 2017 08:52:04 -0500 Message-ID: References: <20170226102029.34afee15@gauss> <20170228225346.34038e9c@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488376571 1225 195.159.176.226 (1 Mar 2017 13:56:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Mar 2017 13:56:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 01 14:56:01 2017 Return-path: Envelope-to: geh-help-gnu-emacs@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 1cj4jV-0007ek-KF for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2017 14:55:57 +0100 Original-Received: from localhost ([::1]:46675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj4jb-0003uo-Pi for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Mar 2017 08:56:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cj4gB-0001iM-Nr for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 08:52:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cj4g8-0003x5-LE for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 08:52:31 -0500 Original-Received: from [195.159.176.226] (port=58112 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cj4g8-0003wp-F6 for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 08:52:28 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cj4fs-0003yX-Hx for help-gnu-emacs@gnu.org; Wed, 01 Mar 2017 14:52:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:wo1HlVxSDjNOL1ebEtOEbiQXVdU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112403 Archived-At: >> (defmacro foo (bar baz) >> (declare (debug (symbolp form))) >> (edebug-\` (let ((,bar (something))) ,baz))) > I couldn't get that to do anything. > Do I evaluate the macro (here foo) normally, No: you need to edebug-instrument the code where you want to single-step (i.e. the places in the code where you want the cursor to stop when you single step), so you want to use C-u C-M-x on that `foo` definition. > then instrument the function that calls it? Of course, you can also use C-x C-M-x on the code that invokes `foo` but it will only single-step within that code, not within the definition of `foo`. Stefan