VS代码调试C ++

时间:2020-09-15 08:28:01

标签: c++ visual-studio-code

曾经尝试学习C ++,但是我无法设置VS代码。每当我尝试调试一个简单的“ Hello world”程序时,我只会得到以下图像:enter image description here

我的launch.json看起来像这样:

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

}

任何帮助将不胜感激。

0 个答案:

没有答案
相关问题