question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSCode extension Clangd 0.1.7 stopped working when connecting remotely to host

See original GitHub issue

Setup:

  • VSCode version 1.49.1
  • Clangd extension version: 0.1.7
  • Remote-SSH extension version: 0.55.0

I am using the extension Remote-SSH to edit code on my office workstation (Linux) from my laptop (Windows 10). After updating the VSCode extension to version 0.1.7, whenever I start the editor I get this message:

The 'clangd' language server was not found on your PATH. Would you like to download and install clang 10.0.0?

It seems like the current version of the extension is not picking up the paths on the remote, because downgrading the Clangd version to 0.1.6 works fine.

These are the settings on my machines (both my laptop and office workstation) regarding clangd and terminal:

    "clangd.path": "/compilers/linux-x86_64-2.10.1/clang9.0.0/bin/clangd",
    "clangd.arguments": [
        "--clang-tidy",
        "--compile-commands-dir=lib/linux-x86_64-2.17/clang9.0",
        "--log=verbose"
    ],
    "remote.SSH.suppressWindowsSshWarning": true,
    "terminal.integrated.shell.linux": "/bin/zsh",
    "terminal.integrated.shellArgs.linux": ["-l", "-i"],
    "terminal.integrated.cursorBlinking": true,
    "terminal.integrated.copyOnSelection": true,

On the laptop (Windows) settings the entry “clangd.path” is a darker colour, probably meaning that it isn’t used. The paths used there (either relative or absolute) are the ones of the office workstation (Linux).

I have also tried killing/restarting the VSCode server but no luck.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

1reaction
letmaikcommented, Oct 7, 2020

Had the same issue. Moving the setting to the remote config makes it work, but it is a bit confusing. Maybe some tooltip could guide the user if a non-standard path is present in the user config?

1reaction
hokeincommented, Sep 25, 2020

In vscode-clangd 0.1.7, we don’t respect the clangd.path in your local setting.json for remote mode.

To keep it working, I think you’d need to put "clangd.path": "/compilers/linux-x86_64-2.10.1/clang9.0.0/bin/clangd" in remote setting (/usr/local/home/<user>/.vscode-server/data/Machine/settings.json)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to install clangd language server in VScode
Try this: first, install clangd manually: sudo apt-get install clangd . then, ctrl+shift+p to 'clangd: Check for language server update'.
Read more >
clangd - Visual Studio Marketplace
Extension for Visual Studio Code - C/C++ completion, navigation, and insights.
Read more >
What's New - Oracle Linux Yum Server
Packages Released on Oracle Linux Yum Server · xrdp-0.9.21-1.el9 - Open source remote desktop protocol (RDP) server (Update) · voms-api-java-3.3.2-11. · rust- ...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
... Bug:307401 - "media-gfx/xsane crashes during startup if xinerama is enabled" ... when using IPv6, allows remote attackers to determine whether a host...
Read more >
Package List — Spack 0.20.0.dev0 documentation
libFLAME is a C-only implementation and does not depend on any external FORTRAN ... is VS Code running on a remote server, accessible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found