Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
skovhus merged 1 commit into bash-lsp:master from robertrossmann:fix/show-correct-error
Sep 16, 2019
Merged

Improve error discovery when the LSP process cannot be started #142

skovhus merged 1 commit into bash-lsp:master from robertrossmann:fix/show-correct-error
Sep 16, 2019

Conversation

Copy link
Contributor

@robertrossmann robertrossmann commented Aug 16, 2019

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 my PATH 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.

Copy link
Collaborator

skovhus commented Sep 2, 2019

Thanks! Can you run a yarn run lint and amend the formatting changes?

Copy link
Contributor Author

robertrossmann commented Sep 2, 2019
edited
Loading

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.

skovhus reacted with thumbs up emoji

@skovhus skovhus self-requested a review September 2, 2019 09:36
Copy link
Collaborator

@skovhus skovhus left a 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!

robertrossmann reacted with heart emoji
@skovhus skovhus merged commit ca55168 into bash-lsp:master Sep 16, 2019
@robertrossmann robertrossmann deleted the fix/show-correct-error branch September 16, 2019 14:00
Copy link

That's good, is it showing error info in output or debug-console ? May change more info in this hint.

Copy link
Contributor Author

@HsunGong the full stack trace and error message will be visible in the DevTools console in VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@skovhus skovhus skovhus approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /