I am using VSCode 1.28.2 on Ubuntu 17.10 and I am using the vscode-remote-workspace extension so that I could work on a remote linux machine. I am able to open the remote workspace but the Intellisense feature is not working. I am getting the following error message:
Unable to start the C/C++ language server. Intellisense features will be disabled. Error: Launching server using command /home/pleskot/.vscode/extensions/ms-vscode.cpptools-0.19.0/bin/Microsoft.VSCode.CPP.Extension.linux failed.
My configuration is:
On my local machine there is a htautau.code-workspace file that contains:
{
"folders": [{
"uri": "sftp://username:passwd@remote_machine_name/path_to_remote_folder?debug=1",
"name": "source"
}]
}
In the same folder where the file htautau.code-workspace is I have a .vscode directory with c_cpp_properties.json that contains:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceRoot}/src/",
"${workspaceRoot}/AAC/",
"${workspaceRoot}/LQAnalysis/",
"${workspaceRoot}/LQAnalysis/src/"
"src/",
"AAC/",
"LQAnalysis/",
"LQAnalysis/src/"
],
"browse": {
"limitSymbolsToIncludedHeaders": false,
"databaseFilename": "",
"path": [
"${workspaceRoot}/src",
"/usr/local/include"
]
},
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
Why isn't the Intellisense working? I will appreciate your help a lot. Best regards
Vojtech
There is this open ticket for the VSCode C/C++ Extension, and the current response is:
We currently only support the "file" URI scheme, so you would need to map the network drive to a drive letter in order for cpptools to see it.
The root cause is apparently a current limitation of the FileSystemProvider
API of VSCode, in that one extension cannot use a filesystem provided by a different extension. (Only VSCode itself can use them all.) There is this open ticket in the main VSCode repo, to allow extensions to use filesystems provided by other extensions. Once this is done I believe the issue in the C/C++ extension can proceed.
UPDATE (May 2020): The OP was using this extension, but by now Microsoft has released the Remote - SSH extension for this use case. It remotes the workspace and extension host over the SSH connection, allowing most extensions to work with the remote code just as if they were running locally. It does need you to be able to tunnel some ports over the SSH connection, which may be disallowed in some strict corporate environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With