Couldn't start client Clang Language Server in VS Code

16,639

Solution 1

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.

Solution 2

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

Share:
16,639
Juan Dent
Author by

Juan Dent

Updated on July 01, 2022

Comments

  • Juan Dent
    Juan Dent almost 2 years

    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