Berzelius VS Code Guide

Introduction

Visual Studio Code (often abbreviated as VS Code) is a free and open-source code editor developed by Microsoft.

VS Code has an SSH extension that allows you to remotely connect to and work on a remote server over SSH. This extension is helpful for developing and editing code on a remote system without leaving the VSCode environment.

Running VS Code on Berzelius

We have a module of VS Code on Berzelius. After connecting to Berzelius via Thinlinc, you can load the module and run VS Code by

module load VSCode/1.84.2-bdist
XDG_RUNTIME_DIR=~/.vscode/runtime code some_dir

Make sure that the directory ~/.vscode/runtime exists.

Using VS Code to Connect to Berzelius

Installing VS Code on Your Local Computer

Follow the instructions and install VS Code on your local computer.

Installing Extension: Remote - SSH

Click the Extensions tab in the left side panel. Search for "Remote - SSH" and install the extension.

Once it’s installed a new tab (Remote Explorer) will appear on the side panel.

Setup SSH Connection

Click the Remote Explorer tab in the left side panel.

Press the plus (+) in the Remote Explorer tab to add a new ssh connection to Berzelius.



Input the ssh connection command.



Update the SSH configuration file. Just hit enter to make the updates. You only need to do it once.



Click the refresh icon in the Remote Explorer and you will see the new SSH connection.



Click "Connect in Current Window.." and Input your password and verification code.



Now you are connected to Berzelius.

Editing Files on Berzelius

You can use the Explorer tab to open your directory on Berzelius.

Click Explorer → Open Folder → Input your directory path. You need to input your password and verification code again.



Open a Terminal on Berzelius

You can have a terminal on Berzelius by clicking Terminal → New Terminal on the top menu bar.

Close the Connection

You can terminate the ssh connection by clicking File → Close Remote Connection on the top menu bar.


User Area

User support

Guides, documentation and FAQ.

Getting access

Applying for projects and login accounts.

System status

Everything OK!

No reported problems

Self-service

SUPR
NSC Express