help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to debug function that uses macros


From: Stefan Monnier
Subject: Re: How to debug function that uses macros
Date: Wed, 01 Mar 2017 08:52:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> (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




reply via email to

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