Install the Remote Development extension pack. When prompted to Select Additional Tasks during installation, be sure to check the Add to PATH option so you can easily open a folder in WSL using the code command. Install Visual Studio Code on Windows (not in your WSL file system).
Visit the VS Code install page and select the 32 or 64 bit installer.
But it's your preference.īut if you are editing on Windows and running on Windows, I'd strongly suggest to run inside Visual Studio itself. I'd rather Alt-Tab and build the project manually by either calling 'make' or building inside Visual Studio. To build from inside VSCode I found it particularly cumbersome. Although the tutorials will teach you how to build a single file, you will need more for large projects.Ĭreate a CMakeLists.txt and then use the cmake-gui to create the Visual Studio project files. Then I recommend you install cmake for Windows. Then install the C++ extensions for VSCode.
These instructions are very detailed:Īnother alternative that I recommend is to use Windows WSL which is like a Linux inside Windows. If you are going to edit and execute on Windows, you have to install either Visual Studio regardless or g++ under MinGW.