背景:之前看网上的配置,可以正常执行,但是调试总是不行
安装插件C\C++,C\C++ Clang Command Adapter,CodeLLDB(用来debug,解决Catalina不支持lldb调试问题)以及code runner(用来编译)
言简意赅,一共要3个文件
- c_cpp_properties.json
- launch.json
- tasks.json
// c_cpp_properties.json
{
"configurations": [
{
"name": "Mac",
"defines": [],
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks",
"${workspaceFolder}/**"
],
"compilerPath": "/usr/bin/g++",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64",
"browse": {
"path