我用vscode调试我的代码,我的代码可以运行但无法启动调试。
我的 launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"targetArchitecture": "x86",
"program": "${file}.exe",
"miDebuggerPath": "D:\\VisualStudioCode\\mingw\bin\\gdb.exe",
"args": [
"blackkitty",
"1221",
"# #"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"externalConsole": true,
"preLaunchTask": "g++"
}
]
}
最佳答案
尝试删除项目目录中的 .vscode 文件,然后重新运行它,我的效果非常好
关于debugging - vscode : Unable to start debugging . miDebuggerPath 的值无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70956914/