elves / elvish

Powerful scripting language & versatile interactive shell
https://elv.sh/
BSD 2-Clause "Simplified" License
5.64k stars 299 forks source link

SIGUSR1 and other debugging mechanisms should be documented #1183

Open krader1961 opened 3 years ago

krader1961 commented 3 years ago

On UNIX you can send SIGUSR1 to an Elvish process to force it to produce a Go backtrace of all goroutines. That information isn't particularly useful to anyone who isn't familiar with Go and the Elvish source code but the mechanism should still be documented. Along with any other mechanisms useful for debugging Elvish behavior. For the moment it's probably sufficient to mention SIGUSR1 in the CONTRIBUTING.md document.

krader1961 commented 3 years ago

As I mentioned recently on Gitter/IRC/IM yesterday the -log (and -logprefix) options also need to be documented. However, my inclination is to replace both options with a -debug option that provides a bit more flexibility. Especially with respect to filtering which messages are emitted and optionally including a stack backtrace for selected messages.