VS Code and HPC#

Introduction#

Visual Studio Code (VS Code) is a code editor widely used for software development. Its integration with remote systems via the Remote-SSH extension allows users to work on HPC clusters directly from their local machines.

However, to facilitate this functionality VS Code runs a program called the vscode-server on the HPC login nodes, which can significantly degrade performance and negatively impact all other users. Moreover, the vscoder-server can remain even after users finish their work and disconnect.

Warning

Do not run vscode-server on login nodes. The additional processes can overload these shared resources, leading to slow response times and potential system instability.

Hint

On this page we present different strategies for working with VS Code in our cluster environments while avoiding negatively impacting the login node(s).

Solutions#

Instead of running VS Code remotely, consider a two-step workflow consisting of

  1. Editing your code and then

  2. Deploying your code only when ready.

This workflow offers several advantages:

  • Improved Performance: Work on your code without the added latency of a remote connections.

  • Version Control with Git: Collaborate with others, track changes and revert them if necessary.

  • Flexible Deployment Options: Deploy updates via git, scp, or sftp to the clusters.

For quick edits on the clusters, such as changing a parameter or a single string inside a file a number of command line editors such as vi or nano are available.

Hint

This approach is considered best practise.