microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.45k stars 1.53k forks source link

Intellisense degraded when using devcontainer remote #12598

Open ianmclinden opened 3 weeks ago

ianmclinden commented 3 weeks ago

Environment

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:

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
sean-mcmanus commented 3 weeks ago

@ianmclinden The cpptools-srv process is crashing in handle_update_intellisense. You should set C_Cpp.intelliSenseCacheSize to 0 if that fixes it, until we can fix the bug with the cache. Are you able to get a crash call stack? It may be the same as https://github.com/microsoft/vscode-cpptools/issues/12464, which might be fixed in our next 1.22.0 release.