Questions tagged [debugging]

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

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge in another. Many books have been written about debugging, as it involves numerous aspects, including interactive debugging, control flow, integration testing, log files, monitoring (application, system), memory dumps, profiling, Statistical Process Control, and special design tactics to improve detection while simplifying changes.

Applications for Debugging:

  • WinDbg - A debugger for low-level debugging, mostly used for production debugging and difficult error solving.
    • WinDbg also contains extensions for .Net debugging like ".Sos", ".SosEx" and more...
  • OllyDbg - An assembly debugger mostly used for reverse engineering and cracking.
    • Note that as for February 2014 OllyDbg only support 32 Bit application debugging.

Learning Sources:

Books:

545 questions
15
votes
2 answers

debugging some elisp -- "end of file during parsing error" in init.el

After a long debugging of my init.el file, it looks like the first line of the following elisp-code, i.e (custom-set-variablesis provoking an 'End of file during parsing' error) which I absolutely don't understand. If I comment this line, all is…
loukios
  • 825
  • 1
  • 9
  • 19
13
votes
1 answer

Find elisp origin of warning

I ran a command and received a warning in the minibuffer. The exact warning was comint-completion-at-point failed to return valid completion data, after I autocompleted a command in shell-mode. How can I determine the elisp origin of the warning?
Matthew Piziak
  • 6,038
  • 3
  • 31
  • 79
10
votes
1 answer

How to compile emacs with debug symbols?

I'm having trouble walking through emacs source code in gdb. I think I'm missing debug symbols. Following a suggestion from https://stackoverflow.com/a/4298982/2752242, I tried: ./configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3"…
Job Evers
  • 300
  • 1
  • 8
10
votes
1 answer

How to debug errors in sentinels and during font-lock

When an error occurs inside a process sentinel or during font-locking, then Emacs doesn't show a backtrace even though debug-on-error was previously enabled. I understand why these errors are caught, the same error might be triggered again while…
tarsius
  • 25,685
  • 4
  • 70
  • 109
5
votes
0 answers

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 e y. After a little time investigating the…
4
votes
3 answers

How to trace the evaluation of all forms in the body of an Elisp function

When working with bash scripts, when something is not behaving the way you want it to, you can add a set -x and the next time you run the script you can see the methods and the sub methods being called in real time. Is there an equivalent switch…
american-ninja-warrior
  • 3,903
  • 2
  • 24
  • 44
4
votes
1 answer

Wrong type argument: stringp, nil

I am essentially trying to build a list of strings, where each of those strings in turn are built by their own functions. However, I get the following error when the code is evaluated: Wrong type argument: stringp, nil Here is the code: (defun…
tam5
  • 141
  • 1
  • 1
  • 4
4
votes
1 answer

"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 Task Manager. An Internet search and some testing…
Anusha
  • 419
  • 4
  • 14
4
votes
1 answer

Why did I get an error message: wrong-type-argument stringp user-init-file

I have (set-register ?E '(file . user-init-file)), so that I can easily jump to my config file. Previously I used a string to specify the path to my init file, but I figured I'd tidy it up a bit. However, it doesn't work, and emacs complains about…
Squidly
  • 1,519
  • 14
  • 18
4
votes
1 answer

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, and I see the following: Warning (server): Unable to…
Faheem Mitha
  • 406
  • 4
  • 16
3
votes
1 answer

How to debug an Emacs that stops taking input and needs to be restarted every few hours, but doesn't throw any errors

I've been having a problem lately where every few hours of use, for some reason I don't understand, Emacs stops responding to input without throwing an error. C-g and Esc-Esc-Esc do nothing, so I'm forced to kill Emacs and restart it. Presumably,…
Zorgoth
  • 840
  • 6
  • 14
3
votes
0 answers

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-line] I expect. This does not happen in Org mode,…
3
votes
1 answer

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 specification error: (error "Autoloading failed to define…
krismath
  • 133
  • 1
  • 6
3
votes
2 answers

Emacs without GUI adding extra text to opened files

Whenever I open a file using emacs without gui (emacs --no-window-system) it modifies the file with the following text: 12;rgb:0000/0000/0000 This text is inserted at the beginning of the file. How can I debug what is happening? How to prevent this…
rph
  • 335
  • 2
  • 7
3
votes
2 answers

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 code in ielm, like (print status) or (defun…
netawater
  • 245
  • 1
  • 6
1
2 3 4 5