1

There is an operation in my setup which makes emacs unresponsive with high CPU.

I checked the emacs process with process monitor, but it does not wait for an other process, so I guess it must be something inside emacs.

I don't want to compile my own emacs with debug symbols (why isn't there a precompiled one?). Is there some feature inside emacs which I could start before invoking the operation, which writes into a text file what emacs is doing, so I can check where it gets stuck?

Debugging a frozen Emacs gives answers that work on Unix-like systems, but Windows doesn't have a USR2 signal. Is there a Windows equivalent?

Drew
  • 75,699
  • 9
  • 109
  • 225
Tom
  • 1,190
  • 7
  • 16
  • 1
    Does this answer your question? [How to debug slow respond or halt?](https://emacs.stackexchange.com/questions/14636/how-to-debug-slow-respond-or-halt) (Sorry, indirect link: that's itself a duplicate of https://emacs.stackexchange.com/questions/506/debugging-a-frozen-emacs) – Gilles 'SO- stop being evil' Jan 31 '21 at 11:49
  • Maybe, but I'm on windows and I don't know if there is a command line tool there to send USR2 signal – Tom Jan 31 '21 at 12:04
  • 1
    That's important information which needs to be mentioned in your question! SIGUSR2 does not exist under Windows. I don't know if Emacs recognizes some equivalent mechanism. – Gilles 'SO- stop being evil' Jan 31 '21 at 12:17
  • I didn't mention Windows, because I thought of some internal emacs mechanism. Like couldn't the elisp interpreter write the name and params of the currently executed function into a file while running elisp when a flag is set ? It's a very simple tracing mechanism, but it could be very useful in such situations, because one could just look at the output file to see what happens when Emacs is unresponsive. – Tom Jan 31 '21 at 15:06
  • If it is an external process being run by Emacs that you invoked (either knowingly or unknowingly), then Windows has a system process monitor and you can quit or force-quit that process. If you can break the command loop within Emacs using `C-g`, then you can type `M-x view-lossage` to see the recent commands and start backtracing/researching from there. I'm only a hobby programmer and am unsure why you think an Emacs with debugging symbols would be useful if you haven't built it from source yourself since `gdb` uses the sources to debug and `.gdbinit` gets loaded from the `src` directory. – lawlist Jan 31 '21 at 20:33

0 Answers0