VSCode for SOI

Written by Timon Stampfli.

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

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

Download VSCode

VSCode runs on all major platforms (Linux, Windows, Mac OS). The installer can be downloaded here: https://code.visualstudio.com/download

On Linux systems also have a look at this: https://code.visualstudio.com/docs/setup/linux

Install a C++ Compiler

Linux:

Install the package build-essential and gdb on Ubuntu or Debian. On other distributions, make sure you have installed g++ (Version at least 7) and gdb.

Apple:

Install XCode and you will have a working clang++ compiler.

Windows:

Install mingw-w64. Run the Windows installer (https://sourceforge.net/projects/mingw-w64/files/ – “MinGW-W64 Online Installer”).

On a 64 bit windows, use the following settings:

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

Settings for 64 bit windows

If you have a 32 bit windows, select i686 as architecture.

After installing, you need to edit the path. Press Windows Key + Pause. In the System window, click Advanced System Settings → Advanced (tab) → Environment Variables. Change the PATH variable (click on it), and add the path where your MinGW binaries have been installed in e.g. add C:\mingw-w64\XXXXX\ming[32-64]\bin in the Windows PATH variable.

Install the SOI VSCode extension

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

Extensions Sidebar Icon

  1. Start VSCode
  2. Open the extensions sidebar, see image to the right.
  3. Search for the SOICode extension and install it
  4. (Optional, for more privacy) Deactivate telemetry
    • Open the settings with (menubar) File → Preferences → Settings
    • Search for “telemetry”
    • Remove the checkmarks from all the checkboxes

Now you’re ready to go!

Create new task

To create a new task, press the symbol of the plugin, click on “New empty SOI task” and follow the instructions.

Alternatively, press Control+Shift+P and write “create” and press the entry “empty SOI task”. Both actions are doing the same.

Compile & Run

To compile and run, do right click and press “IORun Add IO” to add a new sample file. Once you have at least one, you can press Control+Enter to automatically run your code on all samples.