Questions tagged [edebug]
44 questions
22
votes
3 answers
How to cancel `edebug-defun`?
How do I undo the effects of edebug-defun? In other words, how do I rescind the directive that causes edebug to enter debugging mode when a particular function is invoked?
Also, I'd really like to know where the answer to this question is in the…

kjo
- 3,145
- 14
- 42
21
votes
3 answers
Show line number on error
Say that emacs throws some error that I don't understand. Or maybe the error says "Symbol's value as variable is void: modes", but there are many occurrences of the symbol modes in my code, so I need some context. Can Emacs be configured to mention…

Jackson
- 1,218
- 9
- 19
12
votes
0 answers
Edebug orgmode source code blocks with input variables
What is the standard method to debug emacs-lisp orgmode source code blocks with input variables as header arguments?
I found the hacky solution to insert the following snipped in front of a source code block.
(when t ;; t: do debug, nil: do not…

Tobias
- 32,569
- 1
- 34
- 75
9
votes
0 answers
Display all local variables within a edebug session
When using edebug one can get a local variable by command describe-variable (C-h v), but are there any ways to display all local variables?
For example in Python you can call locals() in a pdb session, which returns all the local vars in dictionary.…

atevm
- 928
- 7
- 16
8
votes
3 answers
How do I edebug a function defined in a use-package block?
Here is a minimum working example to demonstrate the problem, you will need to have the use-package package installed:
(use-package ido
:config
(progn
(defun dummy/function ()
(interactive)
(message "I am in the dummy…

Kaushal Modi
- 25,203
- 3
- 74
- 179
7
votes
3 answers
Is it possible to edebug a lambda returned by a function?
For example,
(defun create-function (number)
`(lambda () (* ,number ,number)))
(defalias 'square-two (create-function 2) "adds two")
(square-two)

Russ Kiselev
- 464
- 3
- 10
7
votes
1 answer
Clearing/removing all breakpoints
Is there a mechanism for clearing all breakpoints (remove instrumentation en masse) so as to avoid the need to manually run eval-defun on each instrumented function's definition?

ebpa
- 7,319
- 26
- 53
6
votes
3 answers
Edebug REPL / IELM
I toggled edebug-defun on a function I'm studying.
Once the debugger kicks in, how can I fire a REPL with access to the symbols being debugged?
I know it's possible to evaluate commands with e in edebug-mode, but that's on the minibuffer and not as…

Daniel
- 3,563
- 16
- 41
6
votes
3 answers
Edebug: instrument function without setting breakpoint?
If I have a buffer with the contents
(defun foo()
(interactive)
(bar)
(message "foo"))
(defun bar()
(interactive)
(message "bar"))
...and call eval-buffer with edebug-all-defs set to t, then both calls to foo and bar directly throw me…

Nikratio
- 919
- 1
- 6
- 11
5
votes
0 answers
In what circumstances will edebug produce different behaviour?
I'm trying to debug this julia-mode indentation issue using edebug.
The elisp I'm running is here and the bug only occurs on Emacs 23.3.
TAB is bound to julia-latexsub-or-indent. I can reproduce the issue. However, if I run edebug-defun on…

Wilfred Hughes
- 6,890
- 2
- 29
- 59
5
votes
2 answers
What tools can help make the emacs debug output more readable?
I was expecting to find tools I can use to to e.g. prettify the stack trace, or e.g. show all variables that are bound at each level of the stack trace as you navigate, but haven't found anything. Do any tools to improve the debugging experience…

avv
- 1,563
- 10
- 24
4
votes
2 answers
Tracking down a write to a variable
Something setqs desktop-dirname to nil after my "init.el" is loaded.
I want to track down the offending code.
Just before the end of "init.el", desktop-dirname is correctly set.
I checked run-hooks by giving advise to it, but the variable was found…

mnish
- 55
- 4
3
votes
1 answer
How do I insert a breakpoint so that edebug starts only when that point is reached
I want to instrument a function so that edebug gets control when that point is reached. I can insert (edebug) in the code, however, unless the function is instrumented with edebug (C-u M-S-x), that will be interpreted as (debug), which I don't…

JoeRiel
- 31
- 1
3
votes
2 answers
How to use edebug on a function
I am trying to debug a problem with the alert.el package using edebug. However, I am unable to step through the alert function.
I expect the debugger to enter the function and allow me to step through. Instead, it terminates.
Here is what I'm…

Lorem Ipsum
- 4,327
- 2
- 14
- 35
3
votes
1 answer
Completion in edebug-eval-expression
Is there a way to get completion-at-point to work inside edebug-eval-expression (i.e. similarly to the way it works in eval-expression)? Presently, when I press tab inside of a call to edebug-eval-expression, there are no completion candidates…

Qudit
- 828
- 8
- 16