Skip to content

Instantly share code, notes, and snippets.

@edhebi
Created April 4, 2020 17:46
Show Gist options
  • Save edhebi/82b3d3451f3f3afd5652733338cbd08c to your computer and use it in GitHub Desktop.
Save edhebi/82b3d3451f3f3afd5652733338cbd08c to your computer and use it in GitHub Desktop.
Basic vscode setup
{
"version": "0.2.0",
"configurations": [
{
"name": "g++",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-Wall",
"-Wextra",
"-Wshadow",
"-Wnon-virtual-dtor",
"-Wold-style-cast",
"-Wcast-align",
"-Wunused",
"-Woverloaded-virtual",
"-Wpedantic",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference",
"-Wdouble-promotion",
"-Wformat=2",
"-Wmisleading-indentation",
"-Wduplicated-cond",
"-Wduplicated-branches",
"-Wlogical-op",
"-Wuseless-cast"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment