Skip to content

Launching VS Code (in WSL-ROS)

Info

On the University Managed Desktops, you should follow these steps to launch VS Code every time you need to use it!

Procedure

  1. Launch VS Code from the Windows Application Menu by clicking the Windows Start Menu button: Windows Start

  2. Type "vscode" (or just "code" works as well) and click on the application shortcut that should then appear in the list:

    VS Code Menu

  3. You should have already installed the "WSL" extension. If so, then a green icon should be visible in the bottom left-hand corner of the application window:

    WSL remote

    Click the green icon and then click the "New WSL Window using Distro..." option in the menu that appears:

    New WSL Window

  4. Then, click on "WSL-ROS" to select it (it should be the only one in the list).

    Code WSL

  5. A new VS Code instance should launch, and in this one you should see the green "Remote" icon in the bottom left-hand corner again, but this time the icon should also contain the text: "WSL: WSL-ROS", indicating that the remote extension has been launched inside WSL-ROS:

    New WSL Code

  6. Keep this new VS Code instance open, but close down the original one behind it.

  7. Next, access the WSL-ROS filesystem by:

    1. Clicking the "Explorer" icon in the left-hand toolbar (or use the Ctrl+Shift+E keyboard shortcut),
    2. Clicking the blue "Open Folder" button,
    3. Clicking "OK" to select the default /home/student/ filesystem location.

    WSL Explorer

  8. Finally (we're nearly there, I promise!), you should be presented with a pop-up, asking if you trust the /home/student [WSL: WSL-ROS] folder. Tick the checkbox and click on the blue "Yes, I trust the authors" button:

    Trust

  9. You can now navigate the WSL-ROS filesystem in the explorer window on the left-hand side of the VS Code screen. You'll need to use this to locate the packages and scripts that you create throughout this course!

    WSL Filesystem

Always make sure that the "WSL" extension is enabled!!

Check that you can always see this icon in the bottom left-hand corner of your VS Code screen:

Remote verified

Warning

If you don't see this then start again from the top!