using vrlab with vscode

From GRS Documentation Wiki
Revision as of 20:20, 21 May 2024 by Yi Dai (talk | contribs) (check the formating)
using vrlab with vscode
last updated
relates to


Using vrlab with vscode

VScode can be quite useful for remote development. You can ssh to servers throught editor of VScode. Within several click, you can work on your favourite servers (Snellius, DelftBlue, vrlab, DAIC) like working offline. However, it is quite demanding for servers to support ssh functionality of vscode. DelftBlue recommands not to use vscode for remote development due to the high load from whole university users. Snellius supports vscode functionality. Vrlab does not support ssh functionality due to the security reason (AllowTcpForwarding is disabled).

If you are a big fan of using vscode as your IDE, this tutorial will be helpful for you. The main route is to open virtual-file-system of the server through sftp on vscode, then ssh in the vscode terminal. It does not work 100% as ssh functionality of vscode, but it reduces the load of the server (DelftBlue) and works for the vrlab-type of servers. So far, this method is only tested with Unix like operation systems.

The following instuctions works for ubuntu like system.

1. open your file browser (Nautilus File Manager), connect to the virtual file system of your favourite server
Screenshot1.png



2. press "shift" and right click within this folder you will be prompt with "open in local terminal"

this means you opened a local termial of this virtual file system.


3. then you can open vscode under this folder by
code .

you opened the virtual file system of the server using vscode, you can start to use vscode as the IDE for code development. You can open files using tree-panel on the left. You can open a terminal by "Terminal > New terminal", then ssh to the server. Then we are good to go.

Please note:

  1. you can still use python out of box. However in this case, you are using local python to execute files on the server (virtual file system). Your laptop will load data files from server to memory and then compute. This practice will be slow due to the memory assessing.
  2. Same procedues can be used for DelftBlue.
  3. this method is very similar to the design of MobaXterm (for windows). It only becomes benefitial if you are familar with features you need for highly productive source code editing, and Snippets.

Enjoying coding!