How to set up C++ Compiler with Visual Studio Code. - Setup Visual Studio Code for Multi-File C++ Projects
see also
Notes
In ~/.cache/vscode-cpptools
you will find that VSCode store a huge amount of file info, that you can safely clean to regain some disk spaces.
Quick start
Install Code runner extension.
Customize it inside your project to have includes path, eg:
For one file program, it’s good enough => It will compile them with debug info, in an executable of same name (use )
To debug this single files, use the C/C++ microsoft extension and invoke directly the gdb config (using current file as target).
VSCode’s build in keyboard shortcut to task by making it of type build
. The easiest way to set up tasks is to press ctrl+shift+b
.
In fiel .vscode/tasks.json
Ctrl+F5
=> Run / F5
=> Debug
launch.json