VSCode
VSCode is a popular source-code editor by Microsoft.
Using VSCode installed on your PC/laptop
We recommend that you install VSCode on your PC/laptop and use the Remote - SSH
extension to connect VSCode to the CSF. You can then edit files stored on the CSF using your local copy of VSCode. This will give a better experience when using VSCode and allows you to install the latest version.

Newer versions of VSCode (beyond 1.99) may not work on CSF3 (SGE) and instead you should try logging in to CSF3 (Slurm) – see The CSF3 (Slurm) Info Hub.
Older versions of VSCode do not work on the CSF – please use 1.90.2 or newer.
Configure VSCode Before Connecting to the CSF
Before we setup the connection to the CSF, please do the following configuration in your local VS Code installation. This will help to reduce the CPU usage on the CSF login nodes. Otherwise, your VSCode usage will slow down the CSF for other users.
- Open the
File > Preferences > Settings
panel (or use the shortcutCtrl+,
). - In the search bar at the top, enter the following string:
search.follow
- UNTICK the
Follow Symlinks
option. This will reduce the amount of file search that VSCode performs on the CSF login node.
You can then close the settings tab and proceed with the steps below to install the Remote SSH extension.
Installing the VSCode “Remote – SSH” extension on your PC/Laptop
You must install the Remote - SSH
extension in to your local copy of VSCode on your PC/laptop.
Setting up the connection to CSF for the first time using “Remote – SSH” extension
-
Once Remote SSH Extension is installed ensure that the following are ticked/set in the
Remote SSH extension settings
:# Tick / enable the following options Remote.SSH: Enable Agent Forwarding Remote.SSH: Enable Dynamic Forwarding Remote.SSH: Enable X11 Forwarding Remote.SSH: External SSH_ASKPASS Remote.SSH: Local Server Download -- Set to 'off' in the drop-down menu Remote.SSH: Show Login Terminal Remote.SSH: Use Flock Remote.SSH: Use Local Server
-
Next you need to setup the remote host i.e. CSF3_SGE or CSF3_SLURM.
Hit F1 in your keyboard and select
Remote-SSH: Connect to Host...
Then select
+ Add New SSH Host...
Type:
login01-csf3-test.itservices.manchester.ac.uk
for CSF3_SLURM (new/EL9) orcsf3.itservices.manchester.ac.uk
for CSF3_SGE (old/EL7) and hit enter. -
Connecting to the CSF. Once you have defined the remote host i.e. CSF3_SGE or CSF3_SLURM, you are ready to connect to the CSF.
Hit F1 in your keyboard and select the remote host that you have defined.
In the next screen select
Linux
from the list:In the next screen type your password and then hit enter. Next complete the Duo authentication.
NOTE: The CSF password and DUO 2FA prompt will appear in the Login Terminal window inside VSCode. You must ensure you have ticked
remote.SSH.showLoginTerminal
as shown in the step 1. above under Setting up the connection to CSF for the first time using “Remote – SSH” extension.If you have followed the steps correctly, VSCode will install server package within your home directory in CSF under the folder
~/.vscode-server
. It will take some time for the installation to complete and this installation part will be done only on the first time you are connecting to CSF using VSCode. When the set up is complete, you will see something like this in the screen and the last line will say: end. This confirms that your setup and connection was successful. -
Next time just follow the step 3. Connecting to the CSF onwards to connect again.
Once connected, you can open a new terminal to work in CSF directly from VSCode by selecting:
+ > New Terminal
The new terminal will show you login prompt of CSF like this:
-
Troubleshooting tip for user migrating from old to new CSF3:
If you have any previous installation of VSCode Remote SSH Extension in old CSF3 and are trying to install the VSCode like this in the new CSF3, you should first delete/rename the old
~/.vscode-server
folder in your home directory.
If you are unable to install VSCode on your PC/laptop, then there is a version installed directly on the CSF – v1.48. However, we are unlikely to update this version.
Using the VSCode installed on the CSF
Note that is NOT the recommended method. It is better to install VSCode on your PC/laptop and use the “SSH Connection” module to allow it to login to the CSF (see above.) The version installed on the CSF will be removed in future.
To use the VSCode installed on the CSF, you will need to connect to the CSF with X11 functionality enabled. If you have logged in using MobaXterm on Windows this will have been done automatically for you – proceed with the instructions below. If on MacOS-X or Linux, check you have logged in correctly.
To run VSCode, do the following commands on the command line:
module load apps/binapps/vscode/1.48 code
If you’re compiling code with VSCode, please use an interactive job, for example a 4 core interactive job:
module load apps/binapps/vscode/1.48 qrsh -l short -pe smp.pe 4 code