Skip to content

Instantly share code, notes, and snippets.

@Bryan2333
Created March 10, 2024 08:18
Show Gist options
  • Save Bryan2333/44c49ed8e8efbd3a8fd2d6130d2f9259 to your computer and use it in GitHub Desktop.
Save Bryan2333/44c49ed8e8efbd3a8fd2d6130d2f9259 to your computer and use it in GitHub Desktop.
VSCode CodeLLDB Cpp Config
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "C调试",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "C/C++: gcc 生成活动文件"
},
{
"type": "lldb",
"request": "launch",
"name": "C++调试",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceFolder}",
"preLaunchTask": "C/C++: g++ 生成活动文件"
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: gcc 生成活动文件",
"command": "/usr/bin/gcc",
"args": [
"-fsanitize=address",
"-O0",
"-std=gnu11",
"${file}",
"-g",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"group": {
"kind": "build",
"isDefault": true
},
"detail": "编译器: /usr/bin/gcc"
},
{
"type": "shell",
"label": "C/C++: g++ 生成活动文件",
"command": "/usr/bin/g++",
"args": [
"-g",
"-fsanitize=address",
"-O0",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"group": {
"kind": "build",
"isDefault": true
},
"detail": "编译器: /usr/bin/g++"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment