插件安装
安装C/C++, C/C++ Runner
配置文件
在项目下建立.vscode文件夹,然后分别建立c_cpp_properties.json, launch.json,tasks.json,内容如下:
c_cpp_properties.json:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"llvm-test/llvm-10.0/include",
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "llvm-test/llvm-10.0/bin/clang++",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
launch.json: (注意,debug时可以选择gdb/lldb,lldb需要安装额外插件)
{
"version": "0.2.0",
"configurations": [