-
Notifications
You must be signed in to change notification settings - Fork 137
Improve error discovery when the LSP process cannot be started #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error discovery when the LSP process cannot be started #142
Conversation
Thanks! Can you run a yarn run lint
and amend the formatting changes?
Hi @skovhus, fixed and force-pushed! 🎉
I also updated the console.log
statement to console.error
to show the problem in red in the console, since it's really an error if the extension is unable to start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
HsunGong
commented
Sep 18, 2019
That's good, is it showing error info in output
or debug-console
? May change more info in this hint.
@HsunGong the full stack trace and error message will be visible in the DevTools console in VS Code.
When the
bash-language-server
cannot be started or found the user only sees a message that the process could not be found instead of seeing the actual reason for the failure.This message got me very confused when I installed the extension because I made sure I had the
bash-language-server
installed and could find it in myPATH
but I thought VS Code somehow fails to find it. The actual problem was that I upgraded to Node.js 12 and the process failed to start as it was not compiled against the correct Node.js version. I only discovered that when I actually tried to start the server.This PR improves the discovery of the failure by showing a more generic error message and guiding users to the DevTools console where the actual error is logged.