21 September 2020

What is VS Code?

VS Code or Visual Studio Code is a free open-source, code editing software provided by Microsoft. It is an extremely versatile piece of software which you can customize by adding various extensions to suit your development environment.

Remote Development with VSCode

Now, one of the great things about VSCode is that you can set up a remote development environment, wherein you can connect to a remote machine where your files are saved and work directly off of that remote machine, through VSCode. This means that you can SSH into eceubuntu, have your files saved there and work directly off of it. This is especially helpful, since we will be testing your code on the eceubuntu machines.

How do we install VSCode?

Easy! Follow the steps on the following link and it will give you a step by step guide on how to install VSCode on your machine this.

How do you set up a Remote Development Environment with VSCode?

Setting up SSH

After downloading VSCode on your local machine, ensure that you have SSH set-up on your machine. Check this link for guidance on this.

Download the Remote Development Extension Pack

Click on this link to download the Remote Development Extension Pack. This extension will allow you to SSH into the eceubuntu machines and work on your code remotely through VSCode on your local machine.

Connect to a Remote Host

Logging In

In order to connect to the eceubuntu machines, open up VSCode and click on **Remote-SSH: Connect to Host…** from the VS Code’s Command Palette. It will then prompt you to enter your hostname as shown below:

Enter the following as your hostname: USERID@eceubuntu.uwaterloo.ca, your UserID is just your WATIAM ID. VSCode will then prompt you to enter your password twice and this is the password linked with your WATIAM account.

Accessing Your Files

After you have successfully logged in, you should see a Welcome page, like the one below:

Click on Add Workspace Folder. You should then see a pop-up asking you to select a folder. You can either select a folder or you can just click OK and this will give you access to all your files on account on your VSCode workspace as shown below:

After clicking OK, you will now have access to all your files on the eceubuntu machine and you can start working on your code here!

Helpful Tip

Instead of manually copying your files from your local machine to the eceubuntu machine, just clone your working repository directly on to eceubuntu and work on your code by connecting to eceubuntu from VSCode (as outlined in the steps above). Cloning your repository into eceubuntu is simple, just SSH into eceubuntu and type git clone <URL of respository>.