This is an old revision of the document!
The Visual Studio Code integrated development environment (IDE) makes it possible to edit program code locally, and compile and execute it remotely, through a SSH connection.
This is a very useful and powerful feature, but not everything is possible, or easy.
Perhaps strange to suggest on a page about the use of ssh in vscode, to first suggest not to use ssh. But if possible, a local setup is much easier, as you may realize after reading (and trying) the other setups.
All our desktops, including the vdesk cluster, have a recent version of vscode installed. You can find it in the menu, or execute the command code
from the terminal. Starting from the terminal has the big advantage that you can setup an environment first, and then everyting you compile or run inside vscode will be using that environment. Example:
module load AMUSE/2023.5.1 code
this will run the vscode program with the AMUSE environment loaded, so you can directly execute your AMUSE scripts from vscode.
Instructions for installing the vscode ssh plugin can be found here.
Some common pitfalls:
$HOME/.vscode-server
and space in teh home disk is limited. If this fails, check your quota, move things around, get rid of the incomplete vscode directory and try again.mkdir /data1/username/.vscode-server ln -s /data1/username/.vscode-server $HOME * Creating the .vscode-server directory on a local disk, also avoids the pitfall, that in our institutes, we have computers running different Linux versions (eg desktops running Fedora, older compute nodes running RHEL 7 or 8 and newer ones running RHEL 9 or Rocky 9). And software installed for one of these, might not be compatible with any of the others. And if .vscode-server is in the shared $HOME directory, all operating systems will be using the same instance of this code, and might fail in unpredictable ways.