VS Code for SOI

Written by Timon Stampfli.

Visual Studio Code, short VS Code, is a lightweight but powerful source code editor that comes with many extensions.

This article shows you how to install VS Code and set it up for the workshops.

1. Install VS Code

Download VS Code

If you are on Linux, look at the Linux setup guide.

(Optional, for more privacy) Deactivate telemetry:

  1. Start VS Code.
  2. Open settings with File → Preferences → Settings.
  3. Search for “telemetry”.
  4. Change the Telemetry Level to what you like.

2. Install a C++ Compiler

A compiler turns your source code into a program that you can run.

Windows:You can skip this step. A compiler is already included with SOI Code.
macOS:Open a terminal. Enter clang --version. If you see a version number, a compiler is already installed. Otherwise, enter xcode-select --install.
Ubuntu, Debian:Open a terminal. Enter sudo apt install g++ gdb.
Fedora:Open a terminal. Enter sudo dnf install gcc-c++ libasan libubsan.

You can open a terminal in VS Code with Terminal → New Terminal.

3. Install the SOI Code extension

https://i.imgur.com/UbPFLmH.png

Extensions Icon

Install the SOI Code extension.

We recommend that you also install the C/C++ extension.

If the links don’t work, open the extensions panel (see image to the right) and search for the extensions.

4. Create a workspace

  1. After installing the extension, click the SOI logo which will appear on the left.
  2. Click “Open Folder”.
  3. In the folder selection window which pops up, create a new folder for storing your code files in, and open it.
  4. If VS Code prompts you, select “Yes, I trust the authors”.

Now you’re ready to go!