9

I just installed Visual Studio Code in my Windows 10 machine but I get the error "Couldn't start client Clang Language Server" .... How can I solve this?

Regards, Juan

1
  • For me it happened on a 32-bit Windows VM. Looks like Clang Language Server comes only as a 64-bit binary. Commented Jun 9, 2021 at 21:08

4 Answers 4

6

This is likely because VS Code or an extension is trying to run clang and you do not have it installed or have not configured the path.

Start code from the command line with code --disable-extensions. Does the message still occur? If not, then one of your extensions is to blame. Find which one is related to C or C++ and read the documentation for it.

Sign up to request clarification or add additional context in comments.

2 Comments

You are correct!! Indeed starting with extensions disabled eliminates the message. Will try to disable extensions one by one to see when the errors stop. Thank you!
Most probably vscode-clangd marketplace.visualstudio.com/… and/or C/C++ Clang Command Adapter marketplace.visualstudio.com/…
6

I found this thread when trying to solve this issue for Swift development on vscode. Yes disabling extensions will remove the error but here is the solution for Swift.

After building the Swift plugin for vscode you have to point it to the executable (which I neglected to do). To do this you have to add this JSON to your settings.json

"sourcekit-lsp.serverPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp"

For more information please see this article

1 Comment

If not found there, the executable may also be at /Library/Developer/CommandLineTools/usr/bin/sourcekit-lsp.
0

Uninstalling my Java extensions and reinstalling them and clicking the correct prompts after installation, fixed the issue for me.

Comments

0

For Java developers who might encounter this kind of error this solution might work for you.

could you remove the georgewfraser.vscode-javac extension and install RedHat vscode-java - https://marketplace.visualstudio.com/items?itemName=redhat.java

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.