Skip to main content

Questions tagged [edebug]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Calling a function from one emacsclient can't start Edebug from another emacsclient. Terminal is locked error

I use GNU Emacs 27.1 on Ubuntu 22.04.4, where I use i3 with several emacsclients opened in different terminals, while emacsdaemon is running in background. After setting Edebug instrumentations into ...
Mitu Gabriel's user avatar
0 votes
1 answer
20 views

Why can a function change behavior after instrumenting edebug on it 1 time?

I have a function that's broken until debugging: it returns nil which it shouldn't. After I flag it for debug and unflag it, it works correctly from then on. Why?
meedstrom's user avatar
  • 153
0 votes
0 answers
17 views

Is it possible to use edebug for toggle-debug-on-error?

edebug seems to be much nicer than the regular debug. Can I use edebug when toggle-debug-on-error ?
eugene's user avatar
  • 519
2 votes
0 answers
92 views

How can I watch the contents of the temp buffer created by `with-temp-buffer` while debugging with edebug?

I'm stepping through a function and it calls with-temp-buffer and then inserts some stuff. I'm trying to debug the function and I want to see what's in the temp buffer. I tried hitting e for edebug-...
SometimeslUseCornputers's user avatar
0 votes
1 answer
47 views

Edebug Backtrace keeps disappearing

Has anyone found any way to step through the code using edebug and see how variables change on each step in the backtrace? On my emacs each time you run edebug-next-mode backtrace disappears and you ...
Daniel Krajnik's user avatar
2 votes
1 answer
549 views

Line numbers in backtrace?

I'm working on debugging this backtrace (from Emacs bug #12145, shortened): Debugger entered--Lisp error: (wrong-type-argument "markerp nil") signal(wrong-type-argument ("markerp nil&...
Thomas Koch's user avatar
0 votes
0 answers
35 views

How do I get full length of echo text?

Note: the text I want to see is generated when am in edebug mode my output is "echo text too l..." I want to get "echo text too long." I try setting "eval-expression-print-...
A-nak Wannapaschaiyong's user avatar
0 votes
0 answers
32 views

Disable SPC in spacemacs

In edebug, if I press SPC it should jump to the next stop point. But in spacemacs, if I press SPC, a tips window will appear. So how to disable SPC so that I can use edebug space command?
Tokubara's user avatar
  • 209
0 votes
0 answers
37 views

Understand edebug stack tracing

so for some unknown reason, whenever I edebug-defun to counsel-jq, I get the following error edebug-syntax-error: Invalid read syntax: "Expected one of", symbolp, lambda-expr stack trace ...
A-nak Wannapaschaiyong's user avatar
0 votes
2 answers
189 views

Why is it that during debugging EDebug says local variable is not bound?

For example, I debug a function, I'm stepping in it, I want to check a local variable's value and C-h v says: variable is not bound I can eval the variable, by pressing e and tpying its name, only ...
Tom's user avatar
  • 1,270
2 votes
0 answers
55 views

Is there a friendlier way of viewing data structures when in edebug?

When stepping through a function in edebug I often strain to decipher the data structures that get printed on one line in the minibuffer. Here's one example: Often I'm looking at structures two or ...
Brian Wood's user avatar
0 votes
0 answers
36 views

How to speed up function in helm-dependent library

I have found that the following function is taking up a massive amount of time (75%-85%) in a library I am working on. What is slowing it down? It uses cl-loop, but I don't think that is what is ...
attosaurus's user avatar
2 votes
1 answer
98 views

When working on elisp where to show intermediate values?

I've only recently started diving deeper into elisp. I've been using message a lot in the past, much like println or print when in other languages. The trouble I have is that I'm writing elisp to ...
lucidquiet's user avatar
3 votes
1 answer
310 views

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 ...
JoeRiel's user avatar
  • 31
5 votes
2 answers
348 views

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 ...
avv's user avatar
  • 1,573
0 votes
0 answers
52 views

Debugging huge memory allocation occurring before identified problematic function

I identified a particular situation which causes emacs allocates infinitely memory (and then freezes my PC). To be specific, I have an external link [[file:article.djvu::5][problematic djvu file]] ...
Firmin Martin's user avatar
3 votes
2 answers
1k views

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 ...
Lorem Ipsum's user avatar
  • 4,527
1 vote
0 answers
57 views

How do you debug edebug specs?

As I write progressively more ambitious macros I find my (declare (debug specs)) more involved. There're times where I really wish I could step debug the spec matching itself, or at least perform the ...
zeRusski's user avatar
  • 335
3 votes
1 answer
131 views

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-...
Qudit's user avatar
  • 835
7 votes
3 answers
247 views

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's user avatar
6 votes
3 answers
786 views

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 ...
Daniel's user avatar
  • 3,663
11 votes
0 answers
2k views

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 ...
atevm's user avatar
  • 958
1 vote
1 answer
67 views

What does `#[0` (hash angle bracket 0) mean in the elisp debugger?

When using the debugger I get lines like the following in the stack trace: #[0 "\302\303!\210\300\211\207" [describe-input-method this-command helm-mode 1] 2 "\n\n(fn)"]() I have no clue what the #[...
Hjulle's user avatar
  • 113
2 votes
2 answers
300 views

How can I debug a function that performs most work in a temporary buffer?

I've been able to do this before, but I can't remember the 'recipe' of sorts. Say I've got the following function: (defun fancy-stuff () (with-current-buffer (get-crazy-process-output) (do-...
Sean Allred's user avatar
  • 6,951
1 vote
1 answer
216 views

Debugging a function called when hovering with the mouse over an org link

I am trying to debug a function called when hovering with the mouse over an org link. For example, I instrumented bibtex-completion-apa-get-value with edebug-defun. However, when I hover over an org-...
AlwaysLearning's user avatar
2 votes
0 answers
55 views

How to de-instrument elisp function? [duplicate]

To instrument an elisp function means to set up Emacs in such a way that whenever the function gets executed, debug mode is entered so the function can be executed stepwise. To instrument a function, ...
Evan Aad's user avatar
  • 1,551
8 votes
1 answer
521 views

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's user avatar
  • 7,529
0 votes
1 answer
60 views

How can I use edebug with cl-block?

Given the following function using cl-block: (defun wh/with-block (x) (cl-block 'foo (+ x 1))) I can evaluate it, but C-u M-x edebug-eval-defun gives an error: edebug-syntax-error: Invalid ...
Wilfred Hughes's user avatar
1 vote
1 answer
69 views

edebug-defun indicates a malformed cl-loop

The following code evaluates successfully using eval-defun and runs as I would expect: (require 'cl-lib) (defun my/sample-function () (let ((my-ht (make-hash-table))) (puthash :a 1 my-ht) (...
ebpa's user avatar
  • 7,529
4 votes
2 answers
1k views

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 ...
mnish's user avatar
  • 55
1 vote
0 answers
96 views

How do I teach edebug to only evaluate some macro arguments?

Currently, edebug doesn't understand the ->> macro in dash.el. (defun foo () (->> (+ 1 1) (+ 2) (* 3) (format "%s"))) C-u M-x edebug-eval-defun followed by M-: (...
Wilfred Hughes's user avatar
4 votes
1 answer
1k views

Signaling a breakpoint in Emacs Lisp

Many languages have a mechanism to signal an attached debugger to pause or break. For example in JavaScript this is done using the debugger keyword. In others like C# or Visual Basic the signal is ...
ebpa's user avatar
  • 7,529
22 votes
3 answers
3k views

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 ...
kjo's user avatar
  • 3,267
2 votes
1 answer
551 views

Break on all errors in edebug

How can I make Emacs break on an error, even if the error is being handled somewhere? In my current scenario, the setup of a major mode is modifying the buffer and I want to find out why (and then ...
Gilles 'SO- stop being evil''s user avatar
3 votes
2 answers
68 views

edebug-defun at compile-time or at eval-buffer time?

While I am developing some elisp package I find myself edebug-defun'ing the same critical functions foo-some-mess and bar-more everytime I modify them, or everytime I load the code after compiling. ...
phs's user avatar
  • 1,239
3 votes
1 answer
241 views

Delete breakpoint set using edebug-defun

I set break-point in function (add-hook 'c-mode-common-hook (function (lambda nil (if (or (string-match "llvm" buffer-file-name) (string-match "nvvm" buffer-file-...
vmiheer's user avatar
  • 35
2 votes
2 answers
127 views

Get actual buffer name from backtrace buffer?

I have a buffer foo.el with some invalid code (bar) If i run M-x eval-buffer, with debug on, it show this in backtrace buffer Debugger entered--Lisp error: (void-function bar) (bar) eval-buffer(...
Chillar Anand's user avatar
12 votes
0 answers
1k views

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 ...
Tobias's user avatar
  • 33.4k
6 votes
3 answers
677 views

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, ...
Nikratio's user avatar
  • 949
2 votes
0 answers
220 views

Edebug step-in throws error

(error "You must be before a list form") I instrument a function in emacs. Now, this function is calling some other function. I try to step into this new function using the shortcut key i (step-into-...
Saravana's user avatar
  • 2,081
21 votes
3 answers
6k views

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 ...
Jackson Ray Hamilton's user avatar
8 votes
3 answers
715 views

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 () (...
Kaushal Modi's user avatar
  • 25.8k
2 votes
1 answer
261 views

Can I toggle fringe-mode when entering / exiting edebug?

Paraphrasing a question I previously asked on SuperUser because, IMO, the answer found there does not resolve the issue. Question For the most part I prefer to disable Emacs' fringe. (I customize ...
purple_arrows's user avatar
5 votes
0 answers
75 views

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 ...
Wilfred Hughes's user avatar