Vscode-cpptools: Unable to start debugging. Launch options string provided by the project system is invalid.

Created on 15 Aug 2018  路  3Comments  路  Source: microsoft/vscode-cpptools

Describe the bug

  • OS and Version: Windows 10 1803. 17134.165
  • VS Code Version: 1.26.0
  • C/C++ Extension Version: 0.17.7
  • Other extensions you installed (and if the issue persists after disabling them): None.
    the error look like this

image

This is the launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb)",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/a.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "D:\\CodeBlocks\\MinGW\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

This is the tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build hello world",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g", "${fileBasenameNoExtension}.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

I have google the error, but I don't get helpful information.

And there are no the char "0x08", the launch.json look like this in the notepad++ with show all characteres.
image

Any one can help?馃榾

debugger more info needed

Most helpful comment

Thanks a lot @pieandcakes . And I find the reason.
Missing a character "\" in the path of the gdb.exe.

All 3 comments

Please enable engineLogging and post the output.

Thanks a lot @pieandcakes . And I find the reason.
Missing a character "\" in the path of the gdb.exe.

Ok. Let me know if you need more help.

Was this page helpful?
0 / 5 - 0 ratings