问题:mac机器上使用vscode debug c++,按照网上文章配置后,启动debug会报错:
20200117113221.jpg
debug提示如下:
20200117113242.jpg
说明是和lldebug没法建立连接。
解决办法:使用xcode的lldb-mi替换。
1)找出本地lldb-mi路径:
20200117113322.jpg
2)在launch.json增加miDebuggerPath项
{
"version": "0.2.0",
"configurations": [
{
"name": "c/c++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/test.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb",
"preLaunchTask": "c++",
"logging": { "engineLogging": true },
"miDebuggerPath":"/Applications/Xcode.app/Contents/Developer/usr/bin/lldb-mi"
}
]
}
网友评论