ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

Add `RUBY_LSP_BACKTRACE` option for debugging

Open andyw8 opened this issue 1 year ago • 0 comments

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

andyw8 avatar Feb 08 '24 16:02 andyw8