
Otherwise, use the installer from official site.įor MacOS: same as for Linux. btw i strongly recommend scoop - great package managerįor Linux: if you have it in your package manager repository, install it from there. Install it from the official site:, or from a repository if you’re using a package manager.įor Windows: either download the installer from official site and run it, or install VSCode via scoop: scoop install vscode. The obvious prerequisite is Visual Studio Code.
How do you create a C/C++ project in VSCode (with CMake) and integrate it with VSCode. What extensions you might want to install to ease up the code writing process, and how to configure them.
What tools you’ll need to start developing C and C++ apps in VSCode. It might not be IntelliJ-level of quality, but hey - it’s free. So i made this guide to streamline the process and make it easy for somebody new in C, C++ or VSCode to setup a reasonably working dev environment with some useful quality-of-life tools. However, as C and C++ environment is pretty janky for today’s standards, so is the configuration. Open any C/C++ file, set some breakpoints (or not), and hit the Big Green Play Button.Visual Studio Code is a great open-source editor with plenty of useful plugins for insane amount of languages and frameworks. Restart VSCode to take effects of newly added compiler paths. Create a sample C/C++ projectĬreate a new.cpp file inside it like below: # include using namespace std int main ( ) ĮxternalConsole in launch.json can be set to true to see code output in cmd instead. I tweaked it around and set it up as a complete IDE For small C, C++ projects especially geared towards competitive programming. Lately, I found VSCode and fell in love with it (first love was Atom). The only options available were Dev-C++ (outdated) and the original "Mammoth" Visual Studio. I extensively used C & C++ in my competitive programming years and wanted better support for debugging & IntelliSense.
Though, this guide is focused on the Windows platform but can be extended to Mac and Linux with some minor changes. By the end of this short guide, you’d be able to run, debug, and get IntelliSense for C/C++ files in VSCode.