1

I have a complex Emacs setup. I love it, except for that fact that it freezes a couple of times a day for me. I have a few suspicion:

  1. I use you-complete-me for auto-completion in c++ and it may be hanging on RPC call to the YMCD server.
  2. I use el-get package manager and it occasionally checks with the server.

The problem is that another colleague has almost the same setup and his Emacs does not hang. How would I debug something like this?

3
  • 2
    Use your colleague's setup. ;-)
    – Drew
    Feb 20 '18 at 18:33
  • You can run Emacs under gdb for day to day use until you catch it in the act of freezing .... Build Emacs from source, open the terminal, cd to the ../src directory (to take advantage of gdbinit), then launch gdb ... path/to/emacs that was built from source.
    – lawlist
    Feb 20 '18 at 19:21
  • 2
    Possible duplicate of Debugging a frozen Emacs
    – npostavs
    Apr 13 '18 at 16:50
2
  1. M-x toggle-debug-on-quit
  2. Hit C-g when running into the freeze
  3. ????
  4. PROFIT

Don't forget running M-x toggle-debug-on-quit again after successful debugging, it's rather annoying to have every C-g spawn the debugger.

2
  • On a unixish OS, pkill -SIGUSR2 emacs when Emacs is stuck can work too.
    – npostavs
    Feb 20 '18 at 23:46
  • Put that in your own answer.
    – wasamasa
    Feb 21 '18 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.