贴一下你的launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "lldb",
"request": "launch",
"args": [
""
],
"stopAtEntry": true,
"cwd": "/Users/weil/Vs Code-C++",
"environment": [],
"program": "/Users/weil/Vs Code-C++/build/Debug/outDebug",
"internalConsoleOptions": "openOnSessionStart",
"MIMode": "gdb",
"externalConsole": false
}
]
}
@Huur: 应该是路径中的Vs Code-C++
中的空格导致的,
修改program
和cwd
那两行,分别改成
"program": "${fileDirname}/${fileBasenameNoExtension}",
"cwd": "${fileDirname}",
或者把路径中的Vs Code-C++
改成Vs\ Code-C++
@Laggage: 改文件名不行,不是文件名原因,把那两行改了就可以。谢谢谢谢大佬 可以了 嘿嘿