Vscode-cpptools: Unexpected token / in JSON at position 1360

Created on 29 Jun 2017  Â·  4Comments  Â·  Source: microsoft/vscode-cpptools

image

Not really sure why it's complaining. Can anyone see it?

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceRoot}/Sw/A_XMC/out/obj"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE"
            ],
            // "intelliSenseMode": "msvc-x64",
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/um",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/ucrt",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/shared",
                    "C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/winrt"
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }
        }
    ]
}
Language Service question

All 4 comments

Looks ok to me. My guess is that you saved it while it was in a bad state and then fixed it later, but hadn't dismissed the message from the previous error. This happens to me all the time because I am constantly pressing CTL+S. Press ESC to dismiss the message and save again. If it works, then you're fine. If it doesn't work, you should see a red squiggle in the editor highlighting the error.

The / in the // comment is invalid -- it's not valid JSON. Some of the VS Code JSON files like the settings.json supports the // as an extension to the JSON format, but our c_cpp_properties.json doesn't. If anyone knows a way to use a JSON parser that supports // let us know.

Yes, that was exactly it. Thank you.

Would have been nice if it had pointed out the row. Would have saved me some time.

Was this page helpful?
0 / 5 - 0 ratings