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.
gdbon OSX 10.6.8 and throughlldbon 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? Forlldb, my notes indicate that I had to give permission withDevToolsSecurity -enableand that gave me a confirmation of "Developer mode is now enabled."..., but again that was on El Capitan. For OSX 10.6.8, I runggdbfrom MacPorts instead of the built-ingdb. I have some notes regarding code-signing forggdbon El Capitan, ....gdbworking on your version ofMacOS, build Emacs from source, and launch the binary from thesrcdirectory so that the.gdbinitis 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 ofgdbinstalled 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 ofgdb....