Skip to content

Instantly share code, notes, and snippets.

@Magoninho
Last active November 12, 2020 00:58
Show Gist options
  • Save Magoninho/0ace287540a5a260b326df34f4d94991 to your computer and use it in GitHub Desktop.
Save Magoninho/0ace287540a5a260b326df34f4d94991 to your computer and use it in GitHub Desktop.
Makes Visual Studio Code run C++ code immediately
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Build and run",
"command": "g++ -g ${file} -o ${fileDirname}/${fileBasenameNoExtension} && ${fileDirname}/${fileBasenameNoExtension}",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment