3

My Emacs configuration (Emacs 27, Doom-Emacs config with lots of user-specific tweaks, running on MacOS) sometimes hangs at seemingly random times, and the kill -SIGUSR2 <emacs PID> has no effect. Debugging this would be a lot easier if there was a way to continuously redirect *Messages* and other debugging information to a log file, so I could identify what Emacs was doing (or trying to do) when it crashed.

Is there a way to continuously redirect/copy everything posted to the *Messages* and similar buffers to a file? Alternatively, is there a way to launch Emacs in "verbose" mode from the command line? Most of what I've found suggests running Emacs through gdb, but that's tricky (though not impossible) to set up on MacOS.

  • For a few years now, I routinely run Emacs through `gdb` on OSX 10.6.8 and through `lldb` on El Capitan so that I can catch any crash when it happens. Who do you believe it is "tricky" to accomplish on your version of MacOS? For `lldb`, my notes indicate that I had to give permission with `DevToolsSecurity -enable` and that gave me a confirmation of "*Developer mode is now enabled.*"..., but again that was on El Capitan. For OSX 10.6.8, I run `ggdb` from MacPorts instead of the built-in `gdb`. I have some notes regarding code-signing for `ggdb` on El Capitan, .... – lawlist Aug 26 '20 at 21:52
  • My suggestion would be to bite the bullet by spending the time to get `gdb` working on your version of `MacOS`, build Emacs from source, and launch the binary from the `src` directory so that the `.gdbinit` is read ... Then, the Emacs developers can help you debug and perhaps even fix the problem. I spent quite a bit of time getting a newer version of `gdb` installed on my outdated version of Windows just so that I could obtain help from those Emacs developers who needed a specific debugging readout only available in newer versions of `gdb` .... – lawlist Aug 26 '20 at 22:00

0 Answers0