Skip to content

Setting Up a VS Code IDE

Evan Pezent edited this page Feb 24, 2019 · 25 revisions

So far you have successfully built and installed MEL, perhaps run some of its examples, or even created your own CMake project and built it from the command line. You may be wondering now how you will actually write code. For MEL based projects, we recommend using a lightweight text editor over full blown IDEs like Visual Studio or Eclipse. While these IDEs provide a number of features which are undoubtedly useful, it's is unlikely that you will benefit from the added complexity. Furthermore, it is very easy for your projects to become tightly integrated with the IDE itself, making future migrations difficult.

We recommend using Visual Studio Code (not to be confused with Visual Studio proper). VS Code is similar to text editors like Sublime and Atom, but provides a number of features and extensions which make it well suited for small scale CMake based C++ development.

Start by downloading VS Code:

> choco install vscode    # this one may take a bit, be patient

o ahead and download the Ninja too. This will make the integrated CMake experience better later on.

> choco install ninja

Now open VS Code! We recommended watching these introductory videos before continuing here.

Extensions

There are three extensions you will need:

  1. C/C++ - extension from Microsoft offering code completion, IntelliSense, debuging, etc.
  2. CMake Tools - extension which integrates CMake with VS Code and C/C++ extension
  3. CMake - just a syntax highlighter for CMake files (not strictly needed, but you'll want to have it)

You may also choose to install a new theme. Good options include Dracula Official, One Dark Pro, and Material Theme.

MEL Template Usage

Clone this wiki locally