Ошибка при запуске lldb в vscode | clang++
c++, clang++
Пытаюсь запустить debug режим в vscode на mac os и столкнулся с такой ошибкой:
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))
The program '${path_to_the_file}/002/main' has exited with code 42 (0x0000002a).
Иерархия файлов такая (код запускаю из папки 002):
--.vscode
-001
>someotherfile.cpp
-002
>main.dSYM
>main.cpp
>main
файл tasks.json
{
"tasks": [
{
"type": "shell",
"label": "C/C++: clang++ сборка активного файла",
"command": "/usr/bin/clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
},
],
"version": "2.0.0"
}
файл launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "g++ - Сборка и отладка активного файла",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "C/C++: clang++ сборка активного файла"
}
]
}
Сам код
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
for (const string& word : msg)
{
cout << word << " ";
}
cout << endl;
return 0;
}