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

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

Re: Making ielm behave like a shell (getting to previous commands using


From: Michael Heerdegen
Subject: Re: Making ielm behave like a shell (getting to previous commands using the up-arrow key)
Date: Fri, 18 Dec 2020 10:01:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> That is how I learned it, instruction was somewhere on how to debug
> and I used to do it much in Common Lisp that way.

I must admit that I did not exhaustively understand how you proceed
because the code examples you had posted are broken (let binding syntax
broken).

> When you have
>
> (let ((some 1)
>       (more 2))
>
> How do you go about debugging such function?

Sometimes I insert `message' calls or something more sophisticated to
output values.  That's the simplest tool.

And then, sure, edebug and the built-in debugger - they allow inspecting
values live so there is no need to change the environment unless you
need to save a value for later inspection or reuse.

> Emacs has instrumenting of functions which can help and which is
> similar to setting each variable one by one with setq or setq-local

Similar, but actually much cooler since Edebug and the debugger have
real access to the debugged environment.

> What is your way of debugging it?

Depends on "it".  Apart from the above ways `debug-on-variable-change'
comes handy when you don't know where a binding changes.  Sometimes I'm
also using the tracer to trace variable bindings - one can implement
that easily using (the quite new) variable watchers.

Regards,

Michael.




reply via email to

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