Questions tagged [debug]

The tag has no usage guidance.

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

How can I get a complete backtrace?

I've gotten some code that was supposed to give me a complete backtrace (setq debug-ignored-errors (remove 'args-out-of-range debug-ignored-errors)) , but I still see it shortened with three dots ...
Jason Hunter's user avatar
2 votes
1 answer
24 views

how to load source file for debug?

BTW, you will get a more complete backtrace if you load the source file instead of the byte-compiled file, for the code that defines run-python. (https://emacs.stackexchange.com/a/20265/12031) How do ...
eugene's user avatar
  • 489
1 vote
1 answer
13 views

Re-raise error after adding some context

I have a package that invokes some user-defined code that can be error-prone. For the most part, I'd like to respect the user's choices for handling errors, e.g. debug-on-error. However, due to some ...
erjoalgo's user avatar
  • 863
1 vote
1 answer
90 views

Emacs 28 crashing when using triple quotes for docstrings

In Emacs 28, in python-mode, unbelievably, triple quotes causes emacs CPU utilization to hit 100% and freeze / crash. Apparently a known error related to jit-lock-mode. I'm asking the question here, ...
Marc Cenedella's user avatar
0 votes
1 answer
183 views

How to debug emacs lisp? (e.g. Symbol's value as variable is void: n)

When I start Emacs, I get the error message: Symbol's value as variable is void: n I am pretty sure, it is just a typo in my init.el, but how can I find it? Shouldn't there be a debugger, which tells ...
Sinthoras's user avatar
3 votes
2 answers
223 views

the Name of Function defined in C

I tried to use GDB to debug Emacs. More specifically, I want to observe the behavior of a function written in C. vertical-motion is a built-in function in ‘C source code’. However, the name of a C ...
shynur's user avatar
  • 4,638
2 votes
1 answer
407 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
1 answer
38 views

How to have an elpy breakpoint in a different file

When running tests or scripts using elpy, I would like to set a breakpoint in a different file than the file that is the start of execution. However, from documentation, I see I can only set a ...
Paul Weibert's user avatar
0 votes
1 answer
51 views

Is it possible to save buffers right before emacs freezes?

Once in a while, emacs freezes while there is unsaved progress on my buffers. When it freezes, it does not accept my C-s or save-buffer attempts. Hence I have to restart it. When I restart emacs, my ...
alper's user avatar
  • 1,300
1 vote
0 answers
79 views

How can I log output of debug into a file?

I am GNU Emacs 28.1.91 with native compilation. Emacs freezes so often, where I am unable to find what's is wrong. During the freeze all my work is always gone where the save does not occur. Following:...
alper's user avatar
  • 1,300
1 vote
1 answer
1k views

Problem debugging on dap-mode

I am new to emacs and I was following this tutorial to configure lsp-mode: https://emacs-lsp.github.io/lsp-mode/tutorials/CPP-guide/ But dap-debug does not work. Everytime I try to debug, it doesn't ...
XStein17's user avatar
0 votes
0 answers
27 views

Bug-hunter finds error but it shouldn't (false positive)

I suspect I'm doing something very stupid but I can't figure out what. I have some problems with Eshell, and I was advised to use Bug-hunter. I installed it through Elpa. When I launch it (M-x bug-...
Alessandro Bertulli's user avatar
1 vote
3 answers
80 views

--debug-init not showing enhanced information

I want to debug some problems with my elisp files. But emacs --debug-init is not revealing anything more than if I simply run emacs wint the command emacs. The command emacs gives a warnings window ...
Dilna's user avatar
  • 1
2 votes
1 answer
534 views

Trouble setting up dap for python in Spacemacs

I've been trying to get dap working with python in Spacemacs for a week. I'm trying to start using Spacemacs as my main Python IDE, I should mention I'm new to emacs and spacemacs, I could be missing ...
Airuno2L's user avatar
  • 141
2 votes
2 answers
152 views

How to log backtrace to a file instead of popping it up and blocking following backtraces

With emacs if there is a backtrace buffer open, new backtrace is ignored. I find it is unconvenient when I am trying to find out which function/hook changes a variable. I use debug-watch as described ...
godblessfq's user avatar
  • 1,207
1 vote
0 answers
34 views

How to trigger debugger on emacsclient error

I asked in a prior question about what might be causing my emacsclient widows to shutdown immediately with the following output on stderr: "ERROR: Beginning of buffer". I have tried to use ...
Daniel Doherty's user avatar
0 votes
0 answers
32 views

Possible to find the line or position where an error happens?

With stack traces in elisp, I only see the function and the error that occurred within this function. Is it possible to also include the line number or the character-position where the error took ...
ideasman42's user avatar
  • 8,556
0 votes
1 answer
53 views

How can I apply `(toggle-debug-on-quit)` ignore ` Debugger entered Lisp error: (minibuffer-quit)`

I have (toggle-debug-on-quit) in my init.el file due to find a issue that makes emacs hangs. But it also catches minibuffer-quit. Would it be possible to ignore catched errors for Debugger entered--...
alper's user avatar
  • 1,300
1 vote
1 answer
117 views

How to automatically open the debugger whenever `kill-buffer` is invoked?

I'm using Elpy for Python development, and when I run code with C-c C-c the source buffer closes -- which I don't want. Have to constantly reopen. One idea is to set a breakpoint in kill-buffer - ...
patfla's user avatar
  • 11
0 votes
1 answer
552 views

What’s the most common way to debug C++ on Mac

I'm wondering what's the most common way to debug C++ programs using emacs for Mac users? I’m currently using gdb, which takes a moment for me to make it work for Mac, so I’m now considering give dap-...
Yuxiang Wei's user avatar
4 votes
1 answer
330 views

Emacs elisp debugger: How do i make the debugger jump to source when i press s?

The builtin elisp debugger (i.e. the regular one, debug, not edebug) has a default binding of s to command backtrace-goto-source. When I try to use it, it says: Source code location not known You can ...
nate's user avatar
  • 63
1 vote
0 answers
354 views

dap-mode for nodejs with nodemon

After 5 hours of googling and trying out different configurations i give up. How do i setup dap-mode for debugging nodejs with nodemon so that the debugger restarts when nodemon restarts? Non-solution ...
Simon's user avatar
  • 231
0 votes
1 answer
104 views

Debuggable emacs and vanilla emacs binaries

I'm running Ubuntu 20.04. I would like to build an emacs binary for general usage (no debug symbols) and another emacs binary (when something goes wrong). The build is pretty straight-forward, but I ...
o__b's user avatar
  • 23
0 votes
0 answers
207 views

How to debug emacs config / need to rerun org-mode after startup

I run emacs on Windows and I start with this command: C:\path-to\emacs.exe -q --load "C:/path-to-git-tracked-config-folder/.emacs" --debug-init Emacs starts without error from --debug-init. ...
breathe_in_breathe_out's user avatar
2 votes
1 answer
84 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
2 votes
0 answers
284 views

debugging c++ code with dap-mode in Emacs does not display std::variables (e.g., vector, map, etc) correctly. Any idea to solve this problem?

When I debug c++ code in dap-mode with Emacs, the std::variables, such as vector and map, always have values, [0]: std, shown in the local variable area. Does anybody know what is going on? I am on ...
Jeff's user avatar
  • 21
4 votes
1 answer
253 views

Examine function arguments after debug-on-error

Here's a common debugging scenario: I am investigating a failure and for whatever reason I cannot instrument the relevant code with edebug. I can, however, in most cases get a backtrace via toggle-...
Leo Alekseyev's user avatar
5 votes
2 answers
305 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,563
1 vote
0 answers
183 views

How do I debug a flask application from within emacs?

I want to use something like pdbpp or ipdb to debug a flask application. I've tried but not understood how to set a breakpoint in a python file that's part of a wider application and see it hit. There ...
David Boshton's user avatar
2 votes
0 answers
2k views

Debugging with dap-mode for python and taking user input

I am trying to make dap-mode for python working on spacemacs. For the most part I was able to get it working, but I am having issues taking in input on the CLI def main(): a = input(">") The ...
LLL's user avatar
  • 21
0 votes
1 answer
540 views

Tools to develop and debug ELISP code

I have some experience in Emacs-LISP. Today I spent 6 hours writing LISP code that I guess-timate would have taken 1h30 to write in Python because my workflow to develop and debug is very clunky. In ...
miguelmorin's user avatar
  • 1,805
0 votes
1 answer
637 views

magit commit does not permit adding a gpg signature

I am failing to run gpg to sign commits, after doing so successfully before an upgrade to Mojave and an upgrade to Emacs. (I am not sure when I lost the ability to sign files in the past year.) When ...
sanug's user avatar
  • 87
2 votes
0 answers
144 views

Debugger breaks with Args out of range: "", 0

When forge is installed on a system with no compiler, I sometimes get this error which breaks magit. I'd like to figure out the traceback for this error so I can add some proper error handling, ...
reish's user avatar
  • 121
3 votes
1 answer
376 views

How to navigate stack frames in Emacs debugger?

I'm trying to debug the infamous Unrecognized entry in undo list undo-tree-canary, and after having Emacs debugger triggered on error, I want to move back and forth between stack frames and to examine ...
Hi-Angel's user avatar
  • 554
0 votes
0 answers
41 views

How to file bug report about frozen emacs

Here what I have MacOS Emacs started with $(which emacs) --daemon using emacs mostly in terminal with alias emacs='emacsclient -nw' and then emacs ~/foo.txt to edit files So right now my emacs ...
american-ninja-warrior's user avatar
1 vote
1 answer
67 views

How to debug frequent emacs feezes

I have a complex Emacs setup. I love it, except for that fact that it freezes a couple of times a day for me. I have a few suspicion: I use you-complete-me for auto-completion in c++ and it may be ...
Amit Prakash's user avatar
7 votes
3 answers
230 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
4 votes
0 answers
308 views

Is there an ELISP decompiler?

I'm thinking of writing one so that when I get those horrible tracebacks from bytecode files, I can better see where I was at. Is there one already? Are there any other tools for showing an error ...
rocky's user avatar
  • 888
2 votes
1 answer
163 views

Unable to load bookmarks list on emacs master

Whenever I try to execute bookmark-bmenu-list (which loads the bookmarks file), I get the following error: bmkp-multi-sort: Symbol’s function definition is void: bmkp-info-cp. I am running on emacs ...
Chakravarthy Raghunandan's user avatar
5 votes
1 answer
2k views

Debug pytests in emacs

I try to debug my pytest-cases like this: import pytest def test_something() ... ... pytest.set_trace() Then, i execute the tests by running elpy-test. The test starts to run and stops ...
Markus's user avatar
  • 481
3 votes
1 answer
118 views

How to force `condition-case` to activate the debugger

Often times I need to debug code wrapped in the BODYFORM of condition-case; however, the debugger is suppressed even though I have debug-on-error set to t. The doc-string states that we can add debug ...
lawlist's user avatar
  • 19k
1 vote
1 answer
253 views

Debugging -- debugger-mode -- how to highlight the culprit

Let us take an example such as (max 0 (/ 8 0)) -- the problem is the argument to / -- i.e., DIVISORS cannot be 0. The debugging output looks like this: Debugger entered--Lisp error: (arith-error) /...
lawlist's user avatar
  • 19k
2 votes
1 answer
482 views

Emacs is hanging on almost every word I type. How to identify the problem?

So, that's it. I am writing a lot of LaTeX, and lately emacs is hanging (becoming unresponsive) on almost every word I type, and I have to press C-g to regain control. It started happening around 4 ...
Jeff's user avatar
  • 537
1 vote
1 answer
159 views

Debugging erratic error

The following error appears every other time that a .tex file is opened: Wrong number of arguments, setq, 3 Enabling toggle-debug-on-error gives this backtrace. How to go about debugging this? I've ...
Michael's user avatar
  • 113
4 votes
2 answers
2k views

how to start daemon with `--debug-init` or equivalent debugger?

summary problem I'm trying to debug a problem that involves an Emacs config and daemon startup. But when I run emacs --daemon --debug-init from a console, the spew ends with Loading desktop from /...
TomRoche's user avatar
  • 612
3 votes
1 answer
1k views

Autocompletion of a variable name while Python debugging

Suppose I want to debug Python script in Emacs. M-x pdb run pdb like this pdb script name.py. Next I'd like to examine a variable. I type p and first letters of a variable name, then press Tab and ...
Alexey Reshetnyak's user avatar
3 votes
0 answers
544 views

set breakpoint while in debugger?

Is it possible to set a breakpoint on an arbitrary line while already established in browser()? As a use-case: if I debug(myfunc) and while in Browse[2]> ... I realize that I need to jump forward ...
r2evans's user avatar
  • 245
4 votes
1 answer
337 views

Stack reflection in Emacs Lisp?

Are there reflection methods available in elisp to examine the stack without invoking the debugger? For example: Get the calling/callee function Get the function call stack Get the (longer) nested ...
ebpa's user avatar
  • 7,389
3 votes
1 answer
968 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,389
1 vote
1 answer
895 views

Debug org-mode link to PDF displayed with PDF-Tools

Emacs 24.5 on openSuse Tumbleweed. *.org file with a link to a pdf: [[.\somefile.pdf::2][myfile p 2]] I'm using the PDF Tools to display a PDF in Emacs. What I expect is that page 2 of the PDF will ...
Keks Dose's user avatar
  • 508