Questions tagged [debugging]

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.

94 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17
votes
0answers
1k views

How can I debug random Emacs server crashes?

I generally have a long-running instance of emacs --daemon, which I connect to with various emacsclients. Recently I have started experiencing random crashes. I say "random" because I haven't been ...
9
votes
0answers
457 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 ...
6
votes
1answer
1k views

How do I change the working directory used by pdb/gud?

When running M-x pdb from Emacs, the current directory seems to be set to that of the directory of the script you are running, so pdb ~/path/to/project/__main__.py Would set the working directory ...
5
votes
0answers
519 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 ...
5
votes
0answers
68 views

How to investigate “color bleeding”?

I frequently have color-bleed issues in emacs, most often with AUCTeX: all of a sudden and for no apparent reason, the line I'm writing will be fontified as math. First things first: no, I do not ...
4
votes
0answers
288 views

list of current variables in a buffer for Python code

I would like to find a way to reproduce the "Workspace" of Matlab or the equivalent "Variables" window of the awesome pudb debugger directly in emacs for python code: it is a window which details the ...
4
votes
0answers
253 views

Quitting emacs is very slow

Quitting my Emacs takes a really long time. Is there a good way to track what's happening while quitting Emacs? (So far I'm turning to git blame to figure out what changes I have made to cause this ...
3
votes
0answers
222 views

Debugging in Unity3d with emacs?

I develop in Unity, and have been using emacs as my text editor for development. Debugging however has always needed to be done through monodevelop (and it crashes half the time while doing this). My ...
3
votes
1answer
62 views

(RegEx-)Replace: Sporadic Match data clobbered by buffer modification hooks

I know this was asked in other contexts already, but I couldn't find anything related to C++ development with my hooks that could help me. I am working a lot with replace and query-replace and query-...
3
votes
0answers
98 views

Multiple Quit messages in my *Messages* buffer

When I hold C-p or C-n to navigate any page, the movement is jerky and I get multiple Quit messages in my *Messages* buffer. I checked the C-h l to see the commands ran, it only has the C-n [next-...
3
votes
0answers
145 views

Emacs/realgud/Python: How to display variables at each step?

Using emacs and realgud one can have a separate buffer that automatically shows where the program is currently stopped (by displaying that line of source code). Is there an easy way to get realgud to ...
3
votes
0answers
1k views

Spacemacs C++ debugging?

What tools are you using for setting Breakpoints visualize Variables within Spacemacs? I had a look at gdb but it felt awkward to set the breakpoints separated from the source files. I would like to ...
3
votes
0answers
213 views

Is it possible to debug Django from gud-pdb?

Brand new to gud/pdb and I am trying to run the Django development server from emacs. I can't seem to set breakpoints that affect the running server, though. I am invoking PDB with M-x pdb, then ...
3
votes
0answers
330 views

Emacs sometimes fails to save files

I'm experiencing a weird problem with Emacs on Windows where sometimes, after a while, the current buffer I'm in throws an error when attempting to save the file. I can't seem to reliably reproduce ...
3
votes
0answers
40 views

Display all internet connections during startup

How can I display all Internet connections that are used during startup? Sometimes I work in a low speed Internet environment and I would like to remove all the Internet connection code during startup....
3
votes
0answers
127 views

Why is emacs freezing and how can I prevent it? (likely involving org agenda)

What would cause emacs to "mostly" freeze when creating an org agenda? I say "mostly" because when you type C-g, it does show "Quit" in the minibuffer, and the time logging number in the minibuffer ...
3
votes
1answer
207 views

trace-redisplay: How to see stderr from within Emacs?

When building Emacs, I use ./configure --enable-checking='glyphs' so that I can take advantage of some of the built-in tools such as M-x trace-redisplay. The redisplay debugging messages can be seen ...
3
votes
0answers
576 views

Emacs typing backwards

So, sometimes when I go into a buffer that has a [ as the first character (such as .ini files) emacs suddenly starts typing everything backwards. In other words, if I press the keys y e s I get out s ...
3
votes
0answers
772 views

Why doesn't auto-complete work in ruby-mode?

I have spent several days trying to debug auto-complete, it is working properly in Elisp mode, but when I go in Ruby mode it stops working. auto-complete-mode runs successfully, but the menu of ...
2
votes
1answer
61 views

How can I debug a hang when debug-on-quit doesn't work?

I have a problem with haskell-mode where Emacs will hang every time I open up a Haskell file. Mashing Ctrl-g a few times will get the file opened. So I would imagine setting debug-on-quit would allow ...
2
votes
1answer
81 views

can I use .dir-locals.el to set a default mode for files, and still allow dired?

I have a directory that is all little shell code snippets for being sourced. Tried creating an auto-mode-alist, that does not seem to be effective, so tried creating a .dir-locals.el thusly: ((nil . ...
2
votes
0answers
129 views

Valgrind interface for emacs

Is there an interface similar to 'gdb-mi' for using Valgrind in emacs? What are some ways to use Valgrind inside emacs?
2
votes
0answers
261 views

How to diagnose emacs hanging and 100% cpu on startup?

How can I diagnose this issue? I've tried using strace and I see the following that seems to be stuck in a loop: recvfrom(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., ...
2
votes
0answers
861 views

Extremely slow startup on Windows - How to debug?

I have a serious problem with an extremely slow spacemacs startup (emacs-init-time = ~200s). (The server works, but this is so slow I cannot debug some other problems that I am trying to fix) My ...
2
votes
0answers
563 views

debugging: how to optimize a RealGUD workflow

I code in Python and I my workflow uses debuggers (I coded for 8 years in Matlab). I develop numerical simulation codes: most of the time it returns a result, the question is: "Is the result right?" ...
2
votes
0answers
169 views

`<dead-grave> is undefined`

for a few month, I use Emacs for Latex, and I am French. today (for the first time) when I use C-c ` to see my errors, Emacs answers <dead-grave> is undefined I try to add in my .emacs (...
2
votes
0answers
59 views

inhibit-read-only affects all buffers when *Backtrace* buffer is open

I use buffer-read-only as a safety measure for anything that is important. Recently, I have been debugging functions that use inhibit-read-only and I leave the *Backtrace* open to go about my ...
2
votes
0answers
65 views

how can I debug or fix slowness in org-cycle?

running org-cycle appears to hang sometimes. I've run M-x profiler-start <tab> ;; bound to org-cycle C-g ;; to cancel apparently-hung command M-x profiler-report and I see that a bunch of time ...
2
votes
0answers
527 views

init error: file missing - cl-generic after any time I edit settings.org file

I am using org mode to organize my various Emacs settings. Within my init.el file I just have (taking out initial comments): ;;; Code: (package-initialize) (eval-when-compile (require 'use-package))...
1
vote
0answers
38 views

How to debug C++ (dap-mode + LLDB or GDB)

I want to use dap-mode to debug a C++ code. Until now I followed instructions dap-mode (LLDB) and lldb-vscode. I further enabled the mode and UI via (dap-mode 1) (dap-ui-mode 1) When I execute dap-...
1
vote
1answer
37 views

Non-hex digit used for Unicode escape error when setting org-latex-classes

When I try to set org-latex-classes with the following code: (setq org-latex-classes '(("article" " \\documentclass[12pt,a4paper]{article} \usepackage{xeCJK} %\usepackage[heading]{...
1
vote
0answers
22 views

Org agenda suddenly broken after installing org-mac-link

Org agenda is suddenly broken Symbol’s value as variable is void: org-tag-group-re. How to fix it? Diagnosis: The problematic code seems to be this: ;; org-mac-link (push (expand-file-name "~/....
1
vote
0answers
113 views

Tramp hanging on writing or opening file

Tramp consistently hangs, for me, when opening or writing a remote file. None of the ‘why is Tramp hanging...?’ resources I've found seem to address my situation. What's odd is that this used to ...
1
vote
0answers
106 views

neotree: `all-the-icons-icon-for-dir` raises void-function error

I am getting an error with neotree and i dont know why the arguments from call-interactively are nil. Edit: The Problem is within neotree and i have an empty init file just with neotree and the ...
1
vote
0answers
46 views

How to open 3 emacs windows when debugging using gdb

I am debugging a program that outputs 8 or more lines of display and requires input. So my IO window has to be say 10 rows or so in height. But I also want to see the source code AND of course the ...
1
vote
0answers
256 views

How can i resolve tramp-error: Not a Tramp file name: using a /docker address?

Trying to set up .dir-locals to use a custom python interpreter inside a container so i can use run-python and get the REPL inside the container. I have this setup which seems to partially work in ...
1
vote
0answers
315 views

The Application Emacs is Not Open Anymore (macOS High Sierra)

I am using Emacs (25.2.1) on macOS High Sierra 10.13.2, and when trying to open a simple .txt file using Emacs as the editor, I get the error "The application Emacs is not open anymore". Details: ...
1
vote
0answers
97 views

Emacs really laggy on prog-mode

I noticed Emacs was really laggy on any mode derived from prog-mode two days ago. Before that, everything was fine. I can navigate on a 1000+ lines org-mode file without problem, but I can't even type ...
1
vote
0answers
108 views

How to debug hanging emacs-async command?

I'm trying to set up a function running on my timer to refresh my org-gcal files by using the emacs-async library as follows: (async-get (async-start `(lambda () ,(async-inject-variables "...
1
vote
0answers
110 views

Getting gdb to work for this project

For this project, I cannot seem to get M-x gdb to work in Emacs 25.1 (on Ubuntu 14.04.5 64-bit if it matters - this should be the case for any Ubuntu-based Linux in general I imagine). Steps to ...
1
vote
0answers
596 views

How to debug “company backend” initialization problems?

I am getting error messages initializing some company backend packages, but messages only appear in the *Messages* buffer, like: Company backend 'company-web' could not be initialized: Symbol's ...
1
vote
0answers
231 views

emacs crashes while opening .emacs file

When i try to open my .emacs file with emacs i get an error as such. $ emacs .emacs Fatal error 11: Segmentation fault Backtrace: emacs[0x4f74cb] emacs[0x4dcf3e] emacs[0x4f611e] emacs[0x4f6283]...
1
vote
0answers
102 views

Emacs freezes while editing a tex file

Emacs freezes while I was moving cursor in a latex file with AucTeX-mode (and LaTeX-mode). Emacs becomes black and I can do nothing, including C-g. I followed the approach in this answer, and obtained ...
1
vote
0answers
792 views

Can't exit Emacs with error “End of file during parsing”

Every time I press c-x c-c to exit Emacs, it shows "End of file during parsing" in the minibuffer. I cursorily examined my .emacs and did not find any mismatching parenthesis. Any idea what's the ...
1
vote
0answers
523 views

Debugging a “Warning (bytecomp): reference to free variable” message

I just upgraded to a new bleeding edge version of Emacs in OS X: brew install emacs --HEAD --use-git-head --with-cocoa --with-gnutls --with-rsvg --with-imagemagick I understand that this version is ...
1
vote
0answers
442 views

c-indent-line-or-region: Variable binding depth exceeds max-specpdl-size

I'm trying to define a new major mode using define-generic-mode and want to try reusing c-indent-line-or-region for my indent-line-function. I've inserted (set (make-local-variable 'indent-line-...
1
vote
1answer
936 views

Debugging and setting breakpoints in Java code built with Gradle

I am using Emacs (v24.4) for writing Java applications. I have created a Java library that I am building using Gradle (v2.2) and testing with Spock Framework where I have all my test cases. I would ...
1
vote
0answers
43 views

wildcard expansion in buffer

I'm debugging with pdb in emacs and one of the parameters to the program I'm debugging is a list of regular expressions wrapped in quotes. Basically, pdb someProgram.py 'regex .* .*' from the ...
1
vote
0answers
238 views

Unable to get backtrace for error

I have installed paredit & need to turnoff smartparens. I checked this answer and I have added (advice-add #'smartparens-mode :before-until (lambda (&rest args) t)) to my prelude starter ...
0
votes
0answers
27 views

How to eliminate emacs -Q startup lag

I'm trying out emacs. With no .emacs file and starting emacs 26.1 with emacs -Q on Debian 10, it takes two seconds for the welcome screen to show up. Before the welcome screen, there is a message "...