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.

0
votes
2answers
642 views

Can't see pdb output from shell-mode

I'm on Windows, for what it's worth. Just to make sure that it wasn't something that I did, I fired up emacs using -Q to avoid loading my init.el and attempted to run some python with a breakpoint ...
0
votes
0answers
130 views

Debugging a crippling memory leak

After using a emacs for a while all I see is Garbage collecting...done in the modeline. At this point emacs is constantly garbage collecting but can't free any memory and has to be restarted. Emacs ...
31
votes
2answers
5k views

What do I do when Emacs is frozen? [duplicate]

What should I do when Emacs stops responding? My current "emacs-is-frozen" protocol looks like this: Spam C-g (it sometimes works) Wait for a while. pkill -9 emacs What alternate steps could I try ...
3
votes
0answers
98 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 ...
1
vote
1answer
391 views

“Wrong type argument: symbolp” on function usage

I am trying to use following code: (defun rust-save-and-build (mode) (interactive) (save-buffer) (setq tmp (shell-command-to-string (format "cygpath.exe -m %s" (buffer-...
11
votes
2answers
998 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 ...
1
vote
1answer
66 views

Jump to a bookmark+ dired bookmark from Lisp code

According to the docu of Bookmark+ this code: (bmkp-dired-jump BOOKMARK-NAME &optional FLIP-USE-REGION-P) should allow to quickly jump to a dired buffer that has been bookmarked. I try to eval (...
3
votes
1answer
93 views

detecting obsolete/deprecated settings in elisp files, particularly .emacs

I recently got bitten by a deprecated setting breaking a new package I was trying to use. The same behaviour had been reported by a number of users before me, but the authors were unable to reproduce ...
5
votes
0answers
60 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 ...
0
votes
1answer
494 views

Cryptic startup error messages

I just started out on emacs so this might have a really simple answer. I'm getting an error message on startup and have no idea what it means. The debug message doesn't help much either. What do ...
6
votes
3answers
861 views

How do I debug an “Invalid face reference: quote” message?

After using Emacs for some time, the message Invalid face reference: quote starts popping up in my message buffer. I'm not sure what causes it to start appearing. debug-on-message doesn't do anything ...
3
votes
1answer
181 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 ...
5
votes
1answer
596 views

How to better debug Emacs CPU management?

I can't remember since when exactly, but Emacs is getting slow with basic operations (moving cursor around). It's not exactly slow, but feeling laggy. Before I try and halven my configuration files ...
3
votes
2answers
208 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 ...
4
votes
1answer
113 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-...
5
votes
1answer
2k views

How to fix this startup package initialization problem?

All of a sudden Emacs returns an error at the startup, when I run $ emacs --debug-init from the terminal (linux) I get this debug error message: Debugger entered--Lisp error: (wrong-type-argument ...
2
votes
0answers
472 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))...
9
votes
2answers
569 views

Navigate to the source code of built-in functions and variables

Throughout the day I am constantly using C-h f or C-h v (describe-function and describe-variable) to look up documentation for functions and variables. More often than not, if I don't get all the ...
1
vote
0answers
87 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 ...
2
votes
1answer
59 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"...
3
votes
1answer
64 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 ...
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
777 views

Missing modules when debugging Python code in Emacs

For a number of reasons - the main one being that Emacs is amazing! - I am trying to do all my Python development at work in Emacs instead of Pycharm, which I was using previously. The one component ...
2
votes
1answer
52 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 ...
7
votes
2answers
165 views

Why expression fails in init file, but works fine during session [duplicate]

I want to understand why an expression of the form (load-theme 'my-kewl-theme t) fails1 when run as the last expression in my init (~/.emacs) file, but works fine if I evaluate it as soon as soon as ...
1
vote
1answer
28 views

Construct window with list of keybindings for the Emacs Debugger

I always forget the keybindings for the Emacs debugger. I'd like to have a small window open at the same time the debugger window opens with a list of keybindings (I'm thinking of something that would ...
3
votes
1answer
49 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 ...
4
votes
3answers
69 views

Is there any setting in Emacs to choose perlbrew over perl?

I have a Perl project (developed in Ubuntu 14.04) which cannot be built on perl 5.18.2, but it works on Perlbrew 5.22.0. I have tried to use M-x perldb in Emacs but it looks like Emacs calls Perl 5.18....
1
vote
1answer
310 views

Flycheck.erl checker that uses functions from projectile

Below is my attempt at adapting "erlang" syntax checker (from flycheck.el) for my needs. It tries to use GNU make for compilation instead of erlc. Apart from that nothing is changed. (flycheck-define-...
3
votes
2answers
796 views

Python remote debugging?

How do I debug remote python/twisted code from within Emacs? The closest I got with an internet search was Geben, if I understand correctly, but it has not been maintained for a few years now.
2
votes
2answers
85 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(...
5
votes
2answers
2k views

How do you configure emacs for julia?

What is a recomended way for making emacs as julia code editor? The things which I would like to have are: autocomplete julia shell in emacs with abbility to send the code from buffer debugging
4
votes
1answer
554 views

how to increase the debugging message level

I believe that there is a way to increase the debug level, but I don't recall how. Perhaps I am using the wrong terms, but web searches and looking on StackExchange are not providing me anything ...
3
votes
1answer
628 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
96 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
1answer
37 views

A possible incompatibility between `toggle-frame-maximized` and a mode using `visual-line-mode`

I have (toggle-frame-maximized) in my init file. If I enable the ospl-mode (btw very handy mode) given in the answer https://emacs.stackexchange.com/a/473/, then I minimize the frame, Emacs (GNU Emacs ...
6
votes
4answers
1k views

Debugging slowness in init file (not hostname related)

I am seeing some slowness in my init file loading: $ time emacs --debug-init -eval '(kill-emacs)' -Q real 0m0.672s user 0m0.338s sys 0m0.057s $ time emacs --debug-init --eval '(kill-emacs)...
3
votes
1answer
128 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) ...
1
vote
0answers
704 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 ...
15
votes
1answer
1k views

How do I debug an emacs crash?

I am debugging why emacs crashes when using a function from a package1. The aim of this debug process is to get useful data to submit using M-x report-emacs-bug. To get help on how to debug emacs ...
1
vote
0answers
473 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 ...
7
votes
3answers
439 views

how to get Emacs to locate the error in my init file without relaunching?

When there's an error in one of my init files, I get a vague message like this when I launch Emacs: Warning (initialization): An error occurred while loading /Users/im/.emacs.d/init.elc: (wrong-type-...
0
votes
1answer
238 views

“symbol's function definition is void: -dotimes” Error

I'm trying to use the following function (extracted from the amazing emacs-prelude configuration) (defun prelude-duplicate-current-line-or-region (arg) "Duplicates the current line or region ARG ...
8
votes
0answers
396 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 ...
1
vote
1answer
1k views

“Symbol's function definition is void: org-agenda-skip-scheduled-if-done”

I've recently started using Org-mode, and when I last restarted Emacs, I got the error message Symbol's function definition is void: org-agenda-skip-scheduled-if-done. Upon opening Emacs again using --...
16
votes
0answers
994 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 ...
10
votes
1answer
714 views

How to find out where a function is called from (backtrace/stacktrace)?

I've hit a problem that region is deactivated (in transient-mark-mode). The function deactivate-mark is called and I would like to find out where (and why) it is called from. I tried M-x debug-on-...
1
vote
0answers
427 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-...
2
votes
3answers
474 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 ...
1
vote
1answer
87 views

debug-ignored-errors --> suppress an annoying error/false-positives

In my emacs, i have set (debug-on-error t) to see the error's stacktrace. It is very helpful but for mundane errors, it becomes annoying... One such error is, Debugger entered--Lisp error: (error "...