Visual Studio Code

The recommended application for editing your programs in this course is Microsoft Visual Studio Code. This page describes how to get it setup for development on containers used in this class. It is assumed you have a working container accessible via ssh with ssh keys (no password).

  1. Download VSCode from https://code.visualstudio.com/download

  2. Install the Remote Development Extension for your local VS Code.

  3. Connect to your container. Click the green icon in the lower left, it should say "Open a Remote Window".

    1. For an OIT Remote Container

      1. Choose Open SSH Configuration File and select the one with your user name in the path (e.g., /Users/alvy/.ssh/config).

      2. Add the following to that file and save the file (See image at bottom of page for where to find these from your container reservation page.
        Host <name of your container>
        HostName <name of your container>
        User term
        Port <your port number>

      3. Be sure your OIT container is running.

      4. Click on the lower left green icon again, but now choose Connect to Host and select your container from the drop down.

    2. For a Local Container

      1. Make sure your container is running. Use the command docker ps to list the running containers, you should see it.

      2. Choose Attach to Running Container and select your local container (e.g., cs210) from the dropdown menu.

  4. Your VS code instance is now connected to your container (either OIT Remote or Local)

  5. Open a bash terminal by selecting Terminal->New Terminal from the top menu. This will split the main window into a top portion and bash terminal at the bottom. The top window is where you will edit files and the bottom is where you will execute many commands.

  6. We recommend you install the VS Code Live Share extension in your container as it provides a way to share a view of your code with collaborators and/or TAs remotely.