Questions tagged [debugging]

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

Filter by
Sorted by
Tagged with
3
votes
2answers
240 views

How to debug elisp code when it is running

I have a elisp program which check server in a endless loop, like (while t (let ((status (check-server))) (case status ...) (sleep-for 100)) ) and I want to debug or update ...
3
votes
1answer
84 views

(delete-backward-char) needs an argument?

I have written a function to yank a selected region n times. I get a warning however because of the (delete-backward-char) although it seems to work. Does the (delete-backward-char) need an argument? ...
3
votes
1answer
1k views

“Error in process sentinel: Selecting deleted buffer” when exiting Emacs?

I am getting the following message when I do C-x C-c to exit Emacs: error in process sentinel: Selecting deleted buffer So instead of exiting Emacs like normal, I am forced to close it through ...
3
votes
1answer
49 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-...
3
votes
1answer
56 views

Continue debugging same function

When I write lisp code that contains errors, I debug it with toggle-debug-on-error. Unfortunately, once a certain function triggers the debugger once, Emacs stops launching the debugger on errors in ...
3
votes
2answers
204 views

How to know which function triggered an autoload of a library

How can I monitor when Emacs loads a library because of an autoloaded function, and also know the name of that function? EXAMPLE:  I type M-x eval-buffer in a buffer where one of the functions uses ...
3
votes
1answer
305 views

how to debug constant freezing with emacs org-mode on windows?

I use org-mode with emacs heavily. On LINUX, everything is great. When I have to use windows emacs regularly freezes and I have to kill via task manager and restart. Any suggestions on how I can ...
3
votes
1answer
175 views

Debugging open file handles in emacs

Is there a way I can find what file handles emacs has open, and close these references? Or even better, find where they are being open? Emacs is keeping handles to a large number of files (a leak) ...
3
votes
1answer
42 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: ...
3
votes
1answer
698 views

Correct way to configure the lastest `org-mode` (literate programming)

Update: 11/Aug: I forgot to mention that I'm using literate programming to build the init.el from an org file. It seems that the problem appears when emacs opens the configure.org to generate the .el ...
3
votes
1answer
120 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-...
3
votes
0answers
132 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
54 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
90 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
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
271 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
120 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
199 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
549 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
741 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
2answers
150 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-...
2
votes
1answer
964 views

Error void-variable in mapcar

What is the difference between the two functions func1 and func2? (defun func1 (arg) (if (listp arg) (mapcar (lambda (x) (func1 x)) arg) arg)) (func1 (list 1 2 3)) (defun func2 (arg) (...
2
votes
3answers
526 views

How can I determine which package is adding .emacs.d to my load-path?

I have a bunch of packages installed. One of them is adding ~/.emacs.d to my load-path, which Emacs is (unsurprisingly) complaining about. I could be incorrect here, but: Attempting to bisect my ...
2
votes
2answers
2k views

“Symbol's value as a variable is void: defun” when reloading .emacs?

I am always editing my .emacs file, and I was just wondering if I could reload it without restarting Emacs? Note: I have tried M-x load-file and choosing the .emacs file, but I get this error ...
2
votes
1answer
2k views

How to solve “Autoloading failed to define function sml-mode”?

I have just install a version of emacs (GNU Emacs 24.5.1 i686-pc-mingw32) on a Windows 8 Machine. On trying to open an example SML file (Standard ML Language). An error occurred: File mode ...
2
votes
1answer
44 views

Does function evaluation depend on place where it is defined?

I get an error message from rtags module while trying to call rtags-taglist. While edebugging it I didn't find any problem with this function, although of course debugger printed the same error as ...
2
votes
2answers
53 views

How to append an argument to an external command in init.el?

I 1must append a config file to 2package command, required as -p puppeteer-config.json. In my init.el, I tried changing the native command as shown below: From: (setq ob-mermaid-cli-path "~/...
2
votes
2answers
158 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 ...
2
votes
2answers
158 views

Debugging a recalcitrant eldoc function

I'm using SLIME and common LISP (SBCL) for some weekend hacking. I've just upgraded to emacs 26.1 on Mac OS X 10.13.5. Now I've run into a problem with the setup where I'm suddenly getting: error ...
2
votes
1answer
70 views

Define a function to execute multiple commands

Here is part of my init.el: (defun xx-devanagari-script () (interactive) (save-excursion (face-remap-add-relative 'default :family "Lohit Devanagari") (text-scale-increase) (text-...
2
votes
1answer
97 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....
2
votes
2answers
216 views

Trace calls to a function with the parameters

I need to track the calls to org-tags-view to discover the params passed to it. I tried an advice: (defun his-tracing-function (orig-fun &rest args) (message "org-tags-view called with args %S" ...
2
votes
1answer
226 views

Fixing wrong-type-argument to looking-at in Emacs 25 js-mode on large files

When using js-mode (or js2-mode) on Emacs 25.1 (in Debian 9) to edit some large files, any attempt to insert text after some "random" point in the file fails with an elisp stack trace: Debugger ...
2
votes
1answer
156 views

Obtaining a backtrace on batch invocation of Emacs?

The only way I know of printing a backtrace for errors in batch invocation of Emacs is by setting debug-on-error inline like so: $ emacs -batch --eval "(setq debug-on-error t)" -f "my/foo-function" ...
2
votes
1answer
193 views

How to use NSTRACE when debugging

I would like to use NSTRACE to see its built-in messages, and create new ones, at various locations within nsterm.m. I imagine/guess that enabling NSTRACE needs to be done when configuring Emacs and ...
2
votes
1answer
1k views

(wrong-type-argument stringp nil)-error when starting dired

Dired used to run fine on my machine (Ubuntu 14.04). But for a while now, i keep running into the error (wrong-type-argument stringp nil). This does not only happen with dired but also with other ...
2
votes
1answer
65 views

escape or omit binary data in backtrace buffer?

Many times when I check the backtrace buffer, I can't copy the text out because of the embedded binary data (perhaps it's the internal null characters making the copy function think the string is ...
2
votes
1answer
589 views

Debugging server related warning message

I've been seeing this issue for some time now, but I don't know how to debug it. I start up a emacs instance, using say emacs foo.tex & Then I run C-c C-c to compile. A new window pops open, ...
2
votes
1answer
447 views

Show breakpoints when debugging Matlab

I am using matlab-emacs to debug a matlab script from inside of emacs with GUD. Everything seems to be working as expected except that I don't see any breakpoint indicators in the fringe. This is ...
2
votes
1answer
36 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 ...
2
votes
2answers
38 views

problem with starting emacs via emacsclient

I have no problems starting Emacs from a terminal, while if I start it from the desktop (I have a desktop file containing emacsclient -ca '') Emacs starts with a putt-ugly font (see below a screenshot)...
2
votes
1answer
28 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 ...
2
votes
1answer
197 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 ...
2
votes
1answer
65 views

Get a list of functions evaluated

I am trying to track down a weird bug in my emacs configuration - the cursor, occasionally, jumps to a random location when I am scrolling using the arrow keys, in cc-mode. I don't see any accidental ...
2
votes
2answers
88 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(...
2
votes
1answer
516 views

How can I delete all the gdb related windows/buffers after `q` in gdb CLI window

I use (setq gdb-many-windows t) and (setq gdb-show-main t) configurations in my init.el, so after executing M-x gdb, there will be six windows in the frame, after typing q in the main gdb cli window ...
2
votes
1answer
71 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 ...
2
votes
1answer
601 views

json-readtable-error during org-capture

This problem only arose today and I haven't really changed anything substantial in my init.el so I am sure what the source of the error is. Essentially, when running org-capture (and also during ...
2
votes
1answer
923 views

Debug an elisp error - show call stack when an error occurs

I am relatively new to emacs / elisp, and am trying to build some custom functionality. I have added a number of functions which are added to a major-mode. Occasionally (and seemingly only after a ...