Vscode-cpptools: Syntax highlighting does not work properly in WSL

Created on 9 May 2020  路  1Comment  路  Source: microsoft/vscode-cpptools

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 1909 (build 18363.815), Kali Linux WSL
  • VS Code Version:
  • C/C++ Extension Version:
  • Other extensions you installed (and if the issue persists after disabling them): C/C++, Python, Nim, Java Extension Pack
  • Does this issue involve using SSH remote to run the extension on a remote machine?: No
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

Steps to reproduce

  1. If open the project remotely in WSL, user-defined types, parameters and STL classes (e.g. std::string) are not highlighted. Whereas, if you open it in Windows, everything works fine.

Expected behavior



Logs

-------- Diagnostics - 5/9/2020, 12:20:57 AM
Version: 0.28.0-insiders2
Current Configuration:
{
    "name": "Linux",
    "defines": [],
    "intelliSenseMode": "gcc-x64",
    "compilerPath": "D:/MinGW/bin/g++",
    "includePath": [
        "D",
        "/MinGW/include/**"
    ],
    "compilerArgs": [],
    "cStandard": "c11",
    "cppStandard": "c++20",
    "browse": {
        "path": [
            "D",
            "/MinGW/include/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Translation Unit Mappings:
[ /mnt/d/Coding Folder/Codes/C++/main.cpp ]:
    /mnt/d/Coding Folder/Codes/C++/main.cpp
Translation Unit Configurations:
[ /mnt/d/Coding Folder/Codes/C++/main.cpp ]:
    Process ID: 142
    Memory Usage: 69 MB
    Compiler Path: /usr/bin/clang
    Includes:
        /usr/include/c++/9
        /usr/include/x86_64-linux-gnu/c++/9
        /usr/include/c++/9/backward
        /usr/local/include
        /usr/lib/llvm-9/lib/clang/9.0.1/include
        /usr/include/x86_64-linux-gnu
        /usr/include
    Standard Version: c++20
    IntelliSense Mode: clang-x64
    Other Flags:
        --clang
        --clang_version=90001
Total Memory Usage: 69 MB

-------- Diagnostics - 5/9/2020, 12:22:33 AM
Version: 0.28.0-insiders2
Current Configuration:
{
    "name": "Linux",
    "defines": [],
    "intelliSenseMode": "gcc-x64",
    "compilerPath": "/usr/bin/g++",
    "includePath": [
        "/usr/include/c++/9/**"
    ],
    "compilerArgs": [],
    "cStandard": "c11",
    "cppStandard": "c++20",
    "browse": {
        "path": [
            "/usr/include/c++/9/**",
            "${workspaceFolder}"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}
Translation Unit Mappings:
[ /mnt/d/Coding Folder/Codes/C++/main.cpp ]:
    /mnt/d/Coding Folder/Codes/C++/main.cpp
Translation Unit Configurations:
[ /mnt/d/Coding Folder/Codes/C++/main.cpp ]:
    Process ID: 221
    Memory Usage: 69 MB
    Compiler Path: /usr/bin/g++
    Includes:
        /usr/include/c++/9
        /usr/include/x86_64-linux-gnu/c++/9
        /usr/include/c++/9/backward
        /usr/lib/gcc/x86_64-linux-gnu/9/include
        /usr/local/include
        /usr/include/x86_64-linux-gnu
        /usr/include
    Standard Version: c++20
    IntelliSense Mode: gcc-x64
    Other Flags:
        --g++
        --gnu_version=90300
Total Memory Usage: 69 MB

Screenshots

WSL:
Untitled (2)
Windows:
Untitled (3)

Additional context

Colorization Language Service bug duplicate

Most helpful comment

Hi @alisherzhaken . We're currently tracking this with https://github.com/microsoft/vscode-cpptools/issues/3942 . The good news is, VS Code has added an API that will allow this to work properly, and we're in the process of porting to it. We expect this to be addressed in 0.29.0.

>All comments

Hi @alisherzhaken . We're currently tracking this with https://github.com/microsoft/vscode-cpptools/issues/3942 . The good news is, VS Code has added an API that will allow this to work properly, and we're in the process of porting to it. We expect this to be addressed in 0.29.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeThiHyVong picture LeThiHyVong  路  56Comments

regunHD picture regunHD  路  64Comments

torresdale picture torresdale  路  57Comments

destenson picture destenson  路  70Comments

DigiAngel picture DigiAngel  路  79Comments