使用gdb来调试c++程序, vscode的launch.json应该怎么写
时间: 2023-04-09 07:02:34 浏览: 147
vscode配置文件c-cpp-properties.json/launch.json/task.json
你可以这样回答:“你可以在 launch.json 文件中添加以下配置来使用 gdb 调试 C 程序:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}”
阅读全文