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¶
-
Launch VS Code from the Windows Application Menu by clicking the Windows Start Menu button:
-
Type
"vscode"
(or just"code"
works as well) and click on the application shortcut that should then appear in the list: -
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:
Click the green icon and then click the
"New WSL Window using Distro..."
option in the menu that appears: -
Then, click on
"WSL-ROS"
to select it (it should be the only one in the list). -
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: -
Keep this new VS Code instance open, but close down the original one behind it.
-
Next, access the WSL-ROS filesystem by:
- Clicking the "Explorer" icon in the left-hand toolbar (or use the
Ctrl+Shift+E
keyboard shortcut), - Clicking the blue
"Open Folder"
button, - Clicking
"OK"
to select the default/home/student/
filesystem location.
- Clicking the "Explorer" icon in the left-hand toolbar (or use the
-
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: -
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!
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:
Warning
If you don't see this then start again from the top!