Skip to content

Backslashes in compilerPath aren't escaped in VSCode JSON (Windows) #67

@jpbloom

Description

@jpbloom

The compilerPath populated in c_cpp_properties.json can cause a parsing error to be thrown in VSCode due to unescaped backslashes.

eg.,

"compilerPath": "C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.2 rel1\bin\arm-none-eabi-gcc.EXE",

will fail, but

"compilerPath": "C:\\Program Files (x86)\\Arm GNU Toolchain arm-none-eabi\\12.2 rel1\\bin\\arm-none-eabi-gcc.EXE",

Is fine. Also, converting to forward slashes in the path works.

Might be particular to how certain system configs get the toolchain added to the system environment variables / PATH? Not sure, I'm a bit new to this toolchain.

Current workaround is to manually edit the JSON and then use CMake: Delete Cache and Reconfigure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions