ruby-lsp
ruby-lsp copied to clipboard
Add `RUBY_LSP_BACKTRACE` option for debugging
Motivation
While working on an addon, I was encountering a Sorbet type error. Since TypeError inherits from StandardError, it was being rescued, meaning I couldn't see the full backtrace.
Implementation
I've added an option to run with RUBY_LSP_BACKTRACE. (I originally considered just BACKTRACE but didn't want to risk clashing with other tooling).
Interestingly, this has caught a existing failure in the tests that was failing silently. (I can look into the fix for that).
Automated Tests
Update to always run with RUBY_LSP_BACKTRACE in CI, since it can help to catch issues.
Manual Tests
n/a