* How do you inspect variables when debugging with EDebug?
@ 2022-04-01 5:59 John Kliny
2022-04-01 6:42 ` Tassilo Horn
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: John Kliny @ 2022-04-01 5:59 UTC (permalink / raw)
To: help-gnu-emacs
In the past C-h v worked for this, but apparently by moving to
lexical-binding C-h v cannot pick up let variables at point anymore,
it says variable is not bound.
You can type 'e' and type the variable name, but that is not convenient
at all.
Is there a way like before with C-h v, so you can just put cursor on a
variable during debugging, press a command and it shows the value?
How do you check let-bound variables when debugging with EDebug?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 5:59 How do you inspect variables when debugging with EDebug? John Kliny
@ 2022-04-01 6:42 ` Tassilo Horn
2022-04-01 7:22 ` John Kliny
2022-04-01 7:25 ` Michael Albinus
2022-04-01 14:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2 siblings, 1 reply; 9+ messages in thread
From: Tassilo Horn @ 2022-04-01 6:42 UTC (permalink / raw)
To: John Kliny; +Cc: help-gnu-emacs
John Kliny <emacsuser@mail.com> writes:
> In the past C-h v worked for this, but apparently by moving to
> lexical-binding C-h v cannot pick up let variables at point
> anymore, it says variable is not bound.
>
> You can type 'e' and type the variable name, but that is not
> convenient at all.
>
> Is there a way like before with C-h v, so you can just put cursor
> on a variable during debugging, press a command and it shows the
> value?
>
> How do you check let-bound variables when debugging with EDebug?
I look at the printed value when stepping over the variable or use `e'.
The evaluation list buffer (`E`) is also there.
But I agree that's not very convenient when you have to type the name of
the local all the time. I'd rather prefer if I had a separate window
showing the current values of all locals (maybe with the option to add
some globals there, too [other debuggers call those watches]), or some
tooltips or overlays showing the current values of locals.
Maybe one could come up with some eldoc function which would pass the
symbol under point to `e' automatically...
Bye,
Tassilo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 6:42 ` Tassilo Horn
@ 2022-04-01 7:22 ` John Kliny
0 siblings, 0 replies; 9+ messages in thread
From: John Kliny @ 2022-04-01 7:22 UTC (permalink / raw)
To: Tassilo Horn; +Cc: help-gnu-emacs
> But I agree that's not very convenient when you have to type the name of
> the local all the time.
Picking up the symbol at point and offering it as a default for e is a trival improvement for this.
I wonder why nobody implemented this already.
But fixing C-h v could be the best, so that during debugging beside using the symbol at point it also
offers all current local variables for completion.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 5:59 How do you inspect variables when debugging with EDebug? John Kliny
2022-04-01 6:42 ` Tassilo Horn
@ 2022-04-01 7:25 ` Michael Albinus
2022-04-01 7:40 ` John Kliny
2022-04-01 14:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2022-04-01 7:25 UTC (permalink / raw)
To: John Kliny; +Cc: help-gnu-emacs
John Kliny <emacsuser@mail.com> writes:
Hi John,
> Is there a way like before with C-h v, so you can just put cursor on a
> variable during debugging, press a command and it shows the value?
Move the cursor to point after variable name, and press 'C-x C-e'. That
shall work everywhere, not only during debugging. And not only with
variables, but with any sexp.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 7:25 ` Michael Albinus
@ 2022-04-01 7:40 ` John Kliny
2022-04-01 7:56 ` Michael Albinus
0 siblings, 1 reply; 9+ messages in thread
From: John Kliny @ 2022-04-01 7:40 UTC (permalink / raw)
To: Michael Albinus; +Cc: help-gnu-emacs
> Move the cursor to point after variable name, and press 'C-x C-e'. That
> shall work everywhere, not only during debugging. And not only with
> variables, but with any sexp.
Yep, that works. Not really convenient, though, that you have to move to the end of
the symbol to get its value, even when you're already on it.
Would it be hard to fix C-h v to work with local variables too during debugging?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 7:40 ` John Kliny
@ 2022-04-01 7:56 ` Michael Albinus
0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2022-04-01 7:56 UTC (permalink / raw)
To: John Kliny; +Cc: help-gnu-emacs
John Kliny <emacsuser@mail.com> writes:
Hi John,
>> Move the cursor to point after variable name, and press 'C-x C-e'. That
>> shall work everywhere, not only during debugging. And not only with
>> variables, but with any sexp.
>
> Yep, that works. Not really convenient, though, that you have to move to the end of
> the symbol to get its value, even when you're already on it.
>
> Would it be hard to fix C-h v to work with local variables too during debugging?
No idea. You might write a bug report, this would trigger further discussion.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 5:59 How do you inspect variables when debugging with EDebug? John Kliny
2022-04-01 6:42 ` Tassilo Horn
2022-04-01 7:25 ` Michael Albinus
@ 2022-04-01 14:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-04-01 14:20 UTC (permalink / raw)
To: help-gnu-emacs
I think it's worth pointing out that while EDebug is quite nice (and
was great when it came out), it hasn't seen much development on the UI
side over the last 20 years.
So yes there are many things that could be added to improve it.
This thread already mentioned:
- A display of local vars.
- A way to get the value of the variable under point.
I would add to that:
- A way to "go back". Probably not true reverse execution, but at
least a way to move back&forth in time to see which values were returned
where (this just requires keeping around the sequence of return values
along with the corresponding buffer position).
- A way to ask Edebug to "finish the current loop" or more generally to
run without stopping until we exit the currently surrounding sexp.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
@ 2022-04-01 15:04 John Kliny
2022-04-01 20:17 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 9+ messages in thread
From: John Kliny @ 2022-04-01 15:04 UTC (permalink / raw)
To: help-gnu-emacs
> A way to ask Edebug to "finish the current loop" or more generally to
> run without stopping until we exit the currently surrounding sexp.
I checked and there is o which apparently does this:
‘o’
Run the program until the end of the containing sexp
(‘edebug-step-out’).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: How do you inspect variables when debugging with EDebug?
2022-04-01 15:04 John Kliny
@ 2022-04-01 20:17 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-04-01 20:17 UTC (permalink / raw)
To: help-gnu-emacs
> I checked and there is o which apparently does this:
>
> ‘o’
> Run the program until the end of the containing sexp
> (‘edebug-step-out’).
OMG!
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-04-01 20:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01 5:59 How do you inspect variables when debugging with EDebug? John Kliny
2022-04-01 6:42 ` Tassilo Horn
2022-04-01 7:22 ` John Kliny
2022-04-01 7:25 ` Michael Albinus
2022-04-01 7:40 ` John Kliny
2022-04-01 7:56 ` Michael Albinus
2022-04-01 14:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2022-04-01 15:04 John Kliny
2022-04-01 20:17 ` Stefan Monnier via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).