[Python] VSCode (on a remote Ubuntu) not offering auto-complete suggestions for any C++ or...

Discussão em 'Python' iniciado por Stack, Junho 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am running VSCode on my Windows 11 laptop as the client of a VSCode server on a Ubuntu 22.4 (Jammy) machine.

    This is VScode 1.101.1 (user setup) and my remote Ubuntu has that version too.

    I have a folder which is a mixed Python/C++ project. When I open this folder and then files from that folder I get no auto-complete suggestions for neither Python nor C++.

    [​IMG]

    Both file types have been recognized for what they are (bottom-right corner correctly says either Python or C++). Both relevant extensions (C/C++, Python) are installed on the Ubuntu machineand running. I have a local (to my project) compile_commands.json which I was elsewhere suggested to generate by running cmake with some -D option (not sure if it helps or makes things worse). It has a lot of content, namely 106 entries of the form :

    {
    "directory": "/home/<user>/gpudrive/build/tests",
    "command": "/home/<user>/gpudrive/external/madrona/external/madrona-toolchain/bundled-toolchain/toolchain/bin/clang++ -DMADRONA_LINUX=\"(1)\" -I/home/<user>/gpudrive/src -I/home/<user>/gpudrive/external/madrona -I/home/<user>/gpudrive/external/madrona/src/common/../../include -I/home/<user>/gpudrive/external/json/include -isystem /home/<user>/gpudrive/external/madrona/external/googletest/googletest/include -isystem /home/<user>/gpudrive/external/madrona/external/googletest/googletest -isystem /home/<user>/gpudrive/external/madrona/external/madrona-toolchain/bundled-toolchain/libcxx-noexcept/include/c++/v1 -isystem /usr/local/cuda-12.4/include -g -ggdb3 -fvisibility=hidden -nostdinc++ -nostdlib++ -fno-exceptions -fno-rtti -fcolor-diagnostics -Wshadow -pedantic -Wall -Wextra -march=x86-64-v3 -std=c++20 -o CMakeFiles/my_tests.dir/observationTest.cpp.o -c /home/<user>/gpudrive/tests/observationTest.cpp",
    "file": "/home/<user>/gpudrive/tests/observationTest.cpp"
    },


    I also have a ~/.vscode/settings.json with this litttle content :

    {
    "editor.semanticHighlighting.enabled": true,
    "C_Cpp.enhancedColorization": "Enabled"
    }


    and a project-specific .vscode/settings.json with this :

    {
    "files.associations": {
    "*.hpp": "cpp",
    "*.inc": "cpp",
    "__tree": "cpp",
    "map": "cpp",
    "chrono": "cpp",
    "__bit_reference": "cpp",
    "__node_handle": "cpp",
    "bitset": "cpp",
    "deque": "cpp",
    "__memory": "cpp",
    "limits": "cpp",
    "optional": "cpp",
    "ratio": "cpp",
    "regex": "cpp",
    "tuple": "cpp",
    "vector": "cpp",
    "system_error": "cpp",
    "array": "cpp",
    "functional": "cpp",
    "type_traits": "cpp",
    "utility": "cpp",
    "variant": "cpp",
    "__functional_base": "cpp",
    "algorithm": "cpp",
    "filesystem": "cpp",
    "memory": "cpp",
    "random": "cpp",
    "istream": "cpp",
    "locale": "cpp"
    },
    "C_Cpp.errorSquiggles": "disabled",
    "C_Cpp.intelliSenseEngine": "Default",
    "C_Cpp.intelliSenseEngineFallback": "Enabled",
    "C_Cpp.loggingLevel": "Debug"
    }


    and a local .vscode/c_cpp_properties.json with

    {
    "version": 4,
    "configurations": [
    {
    "name": "<Ubuntu machine>",
    "compilerPath": "/usr/bin/g++",
    "compileCommands": "${workspaceFolder}/build/compile_commands.json",
    "cStandard": "c17",
    "cppStandard": "c++20",
    "includePath": [
    "${workspaceFolder}/**",
    "/usr/include",
    "/usr/local/include",
    "/usr/local/cuda-12.4/include"
    ],
    "intelliSenseMode": "linux-gcc-x64"
    }
    ]
    }


    Not sure what else I might post here that might help.

    What might be missing ?

    Continue reading...

Compartilhe esta Página