vscode gdb报错does not exist

配置文件

vscode gdb报错does not exist_第1张图片

可复制版本

{
“name”: “(gdb) 启动”,
“type”: “cppdbg”,
“request”: “launch”,
“program”: “ w o r k s p a c e F o l d e r / s y s 2. e x e " , " a r g s " : [ ] , " s t o p A t E n t r y " : f a l s e , " c w d " : " {workspaceFolder}/sys2.exe", "args": [], "stopAtEntry": false, "cwd": " workspaceFolder/sys2.exe","args":[],"stopAtEntry":false,"cwd":"{fileDirname}”,
“environment”: [],
“externalConsole”: false,
“MIMode”: “gdb”,
“miDebuggerPath”: “gdb”,
“setupCommands”: [
{
“description”: “为 gdb 启用整齐打印”,
“text”: “-enable-pretty-printing”,
“ignoreFailures”: true
},
{
“description”: “将反汇编风格设置为 Intel”,
“text”: “-gdb-set disassembly-flavor intel”,
“ignoreFailures”: true
}
]
}

注意细节

编译器路径那里直接填写gdb就好,路径配置就用/斜杠,并且直接不用转义字符,如图中所示,如果debug sys1的话就改成这样

vscode gdb报错does not exist_第2张图片

文件目录

vscode gdb报错does not exist_第3张图片

方法另解

vscode gdb报错does not exist_第4张图片
这里可以设置终端的启动应用
或者ctrl+shift+p打开setting里边去查看

你可能感兴趣的:(vscode,ide,编辑器)