VS代码调试C++; 一直试图学习C++,但是我在设置VS代码方面遇到了麻烦。每当我尝试调试一个简单的“Hello world”程序时,我得到的都是这样的图像:
My launch.json如下所示:VS代码调试C++; 一直试图学习C++,但是我在设置VS代码方面遇到了麻烦。每当我尝试调试一个简单的“Hello world”程序时,我得到的都是这样的图像:,c++,visual-studio-code,C++,Visual Studio Code,My launch.json如下所示: "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch",
"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
}
]
}
]
}
非常感谢您的帮助。您是如何编译该程序的?编译成功了吗?还要仔细检查路径。