无法开始调试。程序路径“ ***”丢失或无效(C ++,VSCode)

时间:2019-11-01 14:07:58

标签: c++ json visual-studio-code

在调试任何程序时,都会收到以下错误消息(我尝试浏览launch.json,但我不知道该怎么办。

error message

这是代码和launch.json文件:

#include <iostream>
using namespace std;
int main ()
{
    cout<<"Hello world!!";
    return 0;
}

"version": "0.2.0",
    "configurations":
        {
            "name": "cpp.exe build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/TESST",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "cpp.exe build active file",
        }
    ]
}

0 个答案:

没有答案