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, this has something to do with a change I recently made to my .emacs
, but I've made a lot of changes, and I don't see any good way to debug it. Recursively bisecting could entail spending weeks or months with a semi-functional editor, since the problem takes hours to show up and I don't know how to reliably reproduce it. Emacs isn't throwing an error, so debug on error doesn't help.
Is there some way I can start Emacs such that I can manually debug it on the fly, or so that it will give me a log of what Emacs was doing and I can look at the end to see what was going on when it stopped responding?
emacs -q
which bypasses your.emacs
altogether: you'll lose your customizations, but if it does not encounter the problem, that would tend to confirm your.emacs
hypothesis. The quickest way to deal with that is bisecting your.emacs
as @Drew suggests. And you might want to keep your.emacs
under source control in the future so you can easily go back to a previous version and test things out.pkill -USR2 emacs
suggestion. (I don't think I'm using a server) [note: this is on a computer where I intentionally did not add the change to the Python script; I still have had no problems when the script is run asynchronously]