...
Install VS Code using the installer found at https://code.visualstudio.com/download
Run VS Code
Press
Ctrl+P
Now we need to install the extension pack to enable remote development. The easiest and fastest way is to use the Quick Open box. Use the shortcutCtrl+P
(Windows) or⌘+P
(MacOS) to get the Quick Open box at the top. Run Copy and paste the following command to install command listed below into the box and press Enter. That will start the installation of the Remote Development extension pack:ext install ms-vscode-remote.vscode-remote-extensionpack
Install an OpenSSH compatible SSH client on your local system. See this page section "Installing a supported SSH client" and observe any steps required to do this on your local OS. https://code.visualstudio.com/docs/remote/troubleshooting#_installing-a-supported-ssh-client
For more information about the remote extensions, please visit Microsoft's documentation here: https://code.visualstudio.com/docs/remote/remote-overview
Open the VS Code 'command palette' with
Ctrl+Shift+P
(Windows) orShift+⌘+P
and search forssh config
which should yield one result. Click on it to open your local SSH config file.Configure it as shown with the following settings:
Close and save
** Host & Hostname values should both becsil.cs.ucsb.edu
** User value must be your College of Engineering username all by itself, no @ symbols, no domain names. Just the CoE account's username. Please DO NOT use an email address like "some_student@ucsb.edu" as the username.Save the SSH config file with
Ctrl+S
(Windows) or⌘+S
(MacOS)Close the file using the little "x" close box on its tab at the top, or
Ctrl+F4
(Windows) or⌘+W
(MacOS). If you didn't save before, you will be prompted to save before closing the file.Click the remote button
in the lower left corner of the VS Code window.
Choose "Connect to Host"
Choose
csil.cs.ucsb.edu
. A new window will open with the SSH - Remote attempting to open an SSH session to CSIL.If you see "Are you sure you want to continue?" choose "Continue"
You may close the original VS Code window and leave the newly logged in remote window open. The window you need to keep will have "SSH: csil.cs.ucsb.edu" showing in the colored remote button in the lower left corner.
Go to Extensions on the left sidebar. Search for Python and click the little "install" button in the first result which should be Microsoft's official extension. The extension's info page will display in the right hand pane. You should see under the top title area "Extension is enabled on 'SSH: csil.cs.ucsb.edu'"
...
Open the Terminal pane with
Ctrl+Shift+`
(Windows) or Ctrl+` (MacOS). The last keystroke is the "back tick" or "accent grave" key below ESC). The Terminal pane shows up at the bottom and can be resized as you like.Choose the "Terminal" tab and you should see something like
username@csilvm-##
in the bash prompt. This window pane will let you execute bash commands on the remote SSH server.Using the remote SSH terminal at the bottom, create a new folder to store your development files.
The "Terminal" tab is where your
stderr
andstdout
will display when scripts run.Open the files sidebar using the "two papers" icon.
Click "Open Folder" button and select the new folder/directory you previously created in the bash prompt.
The window will reload and then you will be prompted to re-enter your password. Please do so.
You will be prompted to trust the authors of files in this folder. This is your own directory, so go ahead and choose "Yes, I trust the authors" button. DO NOT check the box above it, it's inappropriate for this use case.
The file explorer bar on the left will now show an empty directory. Choose the "New File" button
and create
hello_world.py
and fill it with a chunk of basic test code.Run it with
Ctrl+F5
(same on Windows or MacOS), or go to Terminal Run menu at the top, and "Run Without Debugging"). The "Terminal" pane will show you the command VS Code ran on your behalf and the output.