Я следую инструкциям https://medium.com/@dexterchan_44737 / visual-studio-code-build-and-debug-a- c -with-cmake-on-ma c -os-7633bc59bf34 но я не могу sh добиться успеха.
Папка моего проекта выглядит так:
c_cpp_properties.json
launch.json
tasks.json
build
-- ...
Challenges
--main.cpp
--CMakeLists.txt
CMakeLists.txt
И некоторые из моих файлов:
c_cpp_properties. json
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
запуск. json
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Iniciar",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/Challenges/DailyCoding_run",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"targetArchitecture": "x86_64",
"externalConsole": false,
"MIMode": "lldb"
}
]
}
задач. json
{
"version": "2.0.0",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/build"
},
"tasks": [
{
"label": "cmake",
"command": "cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug ..",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "always",
"panel": "shared"
}
},
{
"label": "make",
"command": "make -j 8",
"type": "shell",
"presentation": {
"echo": true,
"reveal": "always",
"panel": "shared"
},
"group": "build"
}
]
}
Я строю проект как Tasks: Command Palette... > Run Build Task
Start Debugging
Останавливается в точке останова, но не может щелкнуть что-либо еще, так как не отвечает (не может выполнить Step Over, Step Into ...)
![enter image description here](https://i.stack.imgur.com/qKXhs.png)