microsoft / microsoft/vscode-cpptools

Intellisense degraded when using devcontainer remote

Open
#12,598 1 comment 0 reactions 1 assignee View on GitHub

@sean-mcmanus is already working on this.

Since Aug 20, 2024.

bug Language Service reliability
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: macOS (Sonoma 14.6.1), Windows (10.0.19045)
  • VS Code Version: 1.92.2
  • C/C++ Extension Version: v1.21.6 (also tested 1.20.5, 1.16.3)
  • If using SSH remote, specify OS of remote machine: n/a
  • Devcontainer remote: Ubuntu/jammy, Ubuntu/noble, Debian/bookworm
Bug Summary and Steps to Reproduce

Bug Summary:

Intellisense is not erroring / reverting to tag parsing on devcontainer remotes. May be related to #12557, #12455. Let me know if you'd rather I add this context to a specific open issue.

Example minimum viable error at https://github.com/ianmclinden/vscode-cpptools-errcase

Steps to reproduce:

  • Open the example repo.
  • Under the host workspace, Intellisense works and the src/main.cpp:L9:WillReadMe shows errors squiggles. Autocomplete works fine.
  • Under the devcontainer workspace the error squiggles do not show up, unless intelliSenseCacheSize is set to 0. Autocomplete is degraded to tags.
  • Setting "C_Cpp.intelliSenseCacheSize": 0 masks the issue

Expected behavior:
Devcontainer remotes should have working intellisense

Configuration and Logs
c_cpp_properties.json
{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "gnu++20",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}
C/C++: Log Diagnostics
-------- Diagnostics - 8/20/2024, 7:20:22 PM
Version: 1.21.6
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "/workspaces/itest/**"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/gcc",
    "cStandard": "c17",
    "cppStandard": "gnu++20",
    "intelliSenseMode": "linux-gcc-x64",
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerPathInCppPropertiesJson": "/usr/bin/gcc",
    "mergeConfigurations": false,
    "browse": {
        "path": [
            "/workspaces/itest/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
cpptools version (native): 1.21.6.0
No active translation units.

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 2447
Number of files parsed: 1
Language Server Logs

c_cpp_lsp_log.txt

Other Extensions

n/a

Additional context

Host:
Screenshot 2024-08-20 at 14 23 23
Note: autocomplete of the test namespaces also works, but is not shown.

Devcontainer:
Screenshot 2024-08-20 at 14 22 44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.