Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [debugging]

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

5
votes
1answer
86 views

Surprisingly persistent local variable

A local variable keeps coming back, and I don't know whence. In a certain buffer, TeX-command-extra-options is "--synctex=1", even after I have removed this from my init.el and restarted Emacs. I ...
5
votes
2answers
547 views

How to set gud gdb -i=mi not to replace current buffer?

When using gdb -i=mi to debug a program, I typically split the window into two buffers vertically. But every time my program prints something gud automatically replaces my source code buffer with I/O ...
0
votes
0answers
11 views

`gud-print` results in “Text is read-only” message

Whenever I run gud-print (C-xC-aC-p) with my cursor positioned on a variable while debugging with GUD (specifically via the gdb command), I get the message "Text is read-only" in the echo area. I can'...
0
votes
0answers
10 views

pop-to-buffer: Wrong type argument: window-valid-p, #<window 117>PNG warning: Interlace handling should be turned on when using png_read_image

I occasionally run into the following error when opening a new file with projectile: pop-to-buffer: Wrong type argument: window-valid-p, #<window 117>PNG warning: Interlace handling should be ...
2
votes
2answers
86 views

How to see *Messages* buffer in Spacemacs?

How to see *Messages* buffer as advised in this answer - https://emacs.stackexchange.com/a/32069/23367? Why do I need this? I am new to Spacemacs and I am trying to understand how it can help me ...
3
votes
1answer
699 views

Recentf doesn't remember all files

I have the following problem with recentf. If I open a file from commandline like emacs myfile the file myfile doesn't appear in the list of recently opened files (I also checked directly the file ....
0
votes
1answer
27 views

ansi-term - wrong type argument: characterp, return

When using ansi-term on Emacs a get the following error whenever I press enter in char-mode: wrong type argument: characterp, return I used toggle-debug-on-error and get the following: Debugger ...
1
vote
1answer
23 views

Figuring out what plugin is messing with my input

This is a more general question so I would like to know how to actually debug something like this. Suppose that I have some plugin that does section completion as code is being written. For example ...
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 ...
1
vote
1answer
53 views

Need help with `expand-region`: Symbol’s function definition is void: org-outline-overlay-data

If I try to use er/expand-region but it fails with Symbol’s function definition is void: org-outline-overlay-data. org-version : Org mode version 9.2.2 In the release notes for the current org (9.2),...
0
votes
1answer
132 views

emacs org-mode error during installation in windows

While I try to install org-mode using M-x package-install RET org RET, I am getting the following error. I am new to both emacs and org-mode and using Windows 10. Debugger entered--Lisp error: (void-...
1
vote
1answer
882 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 ...
3
votes
1answer
190 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 ...
0
votes
0answers
43 views

end of file during parsing during org-mode export to latex

I have a weird thing going on with emacs on Fedora 29. Once in a blue moon, my Emacs will go HA! you cannot export to LaTeX with the "error": end of file during parsing during. However, if I move ...
12
votes
1answer
457 views

Get backtrace from error programmatically

If an error is signalled in Emacs Lisp code, and debug-on-error is t, I get a backtrace buffer that makes it easy to figure out where the error occurred. However, for errors that occur while ...
0
votes
1answer
17 views

Wrong type argument: symbolp, possible mismatched parenteses in .spacemacs

I am trying to apply a fix to make it easier to change todo status in org mode. The code is the following: '( (org :variables org-want-todo-bindings t) ) from https://github.com/syl20bnr/...
6
votes
3answers
3k views

How to debug startup problem, if `--debug-init' has no effect

When I launch Emacs24 (in an Ubuntu machine) I get an error message in the init procedure. Warning (initialization): An error occurred while loading `/home/nivaca/.emacs': But when I launch it with ...
2
votes
2answers
90 views

Invalid read syntax “#”

I'm having trouble using: (add-hook ’before-save-hook #’gofmt-before-save) This is supposed to format the go code before saving. The error I get is: Debugger entered--Lisp error: (invalid-read-...
0
votes
0answers
24 views

Emacs flashes when changing buffer with `ido-switch-buffer`

When I change buffer via ido-switch-buffer and enter a python buffer my entire Emacs flashes visually for a second. If I handle other files the same way, it does not. What can be the reason for that? ...
3
votes
0answers
522 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
1answer
36 views

How can I identify all changes to match-data?

I have a sporadic error when running query-replace: Args out of range: #<buffer lib.rs>, 0, 1 There are similar questions: Match data clobbered by buffer modification hooks (RegEx-)Replace: ...
2
votes
1answer
87 views

Multiple URL formats for bug-reference-mode

I’m working on a project which is version controlled using GitLab. GitLab, unlike GitHub, uses two separate URL endpoints for issues and merge requests (AKA Pull Requests): https://gitlab.example....
0
votes
0answers
26 views

Ctrl-g will stop Emacs(terminal) and send it to background, ending with core-dump

I'm using Ubuntu server without GUI(ssh into the server), so I use Emacs in terminal, but since the first day I use it, Ctrl-g will stop Emacs and send it to background multiple times one day, it is ...
0
votes
1answer
32 views

Cannot jump to file or location link in grep-mode or compile-mode

I have recently installed emacs on a new system (Manjaro arch-linux), using my usual configuration (available here, if relevant). However, the jump function never works on this new system: whenever ...
2
votes
0answers
57 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?
0
votes
1answer
44 views

Invalid function: treemacs-block

I use treemacs for project management. For some reason (even if I don't have treemacs buffer opened) when I try to launch Dired for the first time I get invalid function: treemacs-block What is even ...
1
vote
1answer
46 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-...
0
votes
1answer
42 views

how to resolve Symbol's value as variable is void when using ledger-mode

I am trying to setup a workflow wherein I generate Ledger files from different record files. Typically I like to view them in ledger mode after cleaning but if I make a change to the conversion, then ...
0
votes
1answer
103 views

After `M-x pdb` switch to `compilation-mode` automatically?

M-x pdb is great while debugging. When the python process exits though, often there is a traceback left behind in the gud buffer that I'd like to view using compilation-mode so I can use next-error ...
2
votes
0answers
74 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 ...
0
votes
0answers
142 views

Spacemacs error when loading `.spacemacs` which uses package `flycheck`

I added the following at the end of my ~/.spacemacs file: (use-package flycheck :defer t :init (global-flycheck-mode)) When I do this, I get Spacemacs encountered an error while loading your '/...
1
vote
1answer
30 views

Why is check-ert output cut at 70 characters column?

Sometimes when packaging emacs packages for Debian, I need to debug test failures. Then the debugging output is cut at 70 characters like in this bug report: https://bugs.debian.org/cgi-bin/bugreport....
0
votes
1answer
38 views

Why do parts of my Emacs buffer turn invisible when I'm writing elisp?

When I'm writing elisp code, parts of the buffer that I press enter on turn invisible (i.e. they get the property invisible set to t). I haven't been able to reproduce this reliably, because it doesn'...
1
vote
1answer
219 views

How to issue commands to pdb?

I have been trying to use pdb to debug my Python program, however whenever I get to this screen I don't know what to do. Usually when I use pdb I just type commands after (Pdb), but when I try to do ...
2
votes
1answer
27 views

Get asked to confirm safe theme forever

I created a theme which I stored in ~/.emacs.d/themes/, added this directory to custom-theme-load-path, and put (load-theme "the-theme.el") in my init.el. Now restarting emacs, I get prompted whether ...
0
votes
0answers
44 views

Unknown *emacs* process

I recently realized that every time I lunch emacs, after a minute, a strange buffer appear in buffers list that is linked to an emacs process, infact it also appear in system's process list: When I ...
3
votes
0answers
86 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-...
2
votes
1answer
61 views

eval-after-load and define-key of raise-sexp results in an error of “Unbalanced parenthesis”

(eval-after-load 'lisp-mode (define-key emacs-lisp-mode-map (kbd "C-c r") 'raise-sexp)) When above lisp is evaluated, it shows following error message. up-list: Scan error: "Unbalanced parentheses"...
1
vote
0answers
71 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 ...
2
votes
1answer
67 views

M-= shortcut suddenly stops working in Emacs in KDE

I'm trying to run M-= on a region of text, but nothing happens. I think the shortcut is registered (I don't get a message like "M-= is undefined") but the execution stops for some reason and there is ...
0
votes
0answers
42 views

Slime inspector for emacs lisp

I want to know, if there is some possibility of inspecting an object as slime inspector does. For example, using libyaml I get the following result, it worked well: ELISP> (yaml-read-from-string ...
0
votes
1answer
317 views

Gui won't start, throws an “Args out of range: 0, 100”

The only response I got is this: Weird behavior: GUI won't start, but terminal emacs will But he doesn't clarify on the solution. I have the same problem, my .Xdefaults and/or .Xresources causes ...
0
votes
1answer
14 views

Adjust end index in selected region

Following the advice given here, I wrote the following code to enclose the text selection in phpbb italics tags : (defun wrap-in-phpbb-italics-tag (b e) "does what its name says." (interactive "...
1
vote
1answer
188 views

Wrong type argument: stringp, (“~/capture.org”)

I am setting up a few hydras, one of which should open a frequently accessed file. The following command works, if I bind a keyboard sequence to it: (lambda () (interactive) (find-file "~/capture.org"...
2
votes
0answers
97 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 ...
0
votes
0answers
25 views

fault-tolerant `check-parens` resp. `scan-lists`

Looking for a way to have a fault-tolerant navigation. I.e. in case of broken syntax, uncomplete forms etc. --when check-paren fails--, it should try some heuristics. Unfortunatly can't use check-...
1
vote
1answer
79 views

Problem debugging in `gud-mode' (M-x `gdb' with `many-windows' enabled)

I'm debugging a large codebase (written in C++). Everything works perfectly if I run gdb from a regular terminal as follows: $ gdb <program-name> Reading symbols from <program-name>......
2
votes
1answer
261 views

gdb-many-windows causes hangs in emacs 24.5

When running gdb -i=miand then attach to the process for debugging, emacs hangs for like 5 minutes before I can type anything. After trial and error I found it is caused by the following line in my ...
1
vote
1answer
46 views

Unclear error message from a function call in my init file

With my Emacs 26.1 on my 10.13.6 Mac, I want Emacs to systemically open my file located at /Users/ewandelanoy/Documents/html_files/Printable/latinized_agreda2.txt with the mac-roman-mac encoding, ...
-1
votes
1answer
39 views

how to get region start and region end from the whole buffer as variables to call another func

(defun buffer-to-shell() (let (buffer mark-whole-buffer))) (shell-command-on-region start end "sed s/foo/bar/") ;; start, end not defined ) As you might see there are undefined variables start ...