This is an old revision of the document!


Using VSCode Remotely on Stu for C (Windows)

VSCode has extensions for C/C++ Intellisense; however, it will not work unless set up as described below.

Prerequisites

  1. Do not use the Remote SSH Extension for VSCode to access stu as this creates extra processes on stu.
  2. Install WSL Version 2 with Ubuntu 20.04 LTS.
  3. (Optional) Install the new Windows Terminal

In WSL

  1. Start Ubuntu from its CLI or the Windows Terminal, username and password can be anything
  2. Run sudo add-apt-repository universe (may already be enabled)
  3. Run sudo apt update && sudo apt upgrade
  4. Run sudo apt install gcc
  5. Mount your stu directory remotely from within WSL according to the instructions for Linux found here.

In VSCode

  1. Start VS Code.
  2. Press F1, select Remote-WSL: New Window for the default distro, or Remote-WSL: New Window using Distro for a specific distro (if you have multiple installed). There will be a first-time setup process.
  3. You should see this something similar to this in the bottom left corner.
  4. Use the File menu to open your remotely mounted stu dir or project folder at ~/home/your-eid/mnt/stu.

While Working

  • You will need to install any external libraries in WSL (ex: OpenSSL for CS457)
  • SSH from your WSL terminal into stu to compile and run code to ensure compatibility.
  • Avoid compiling and running from your local WSL.