using vrlab with vscode: Difference between revisions

From GRS Documentation Wiki
No edit summary
mNo edit summary
 
Line 5: Line 5:
==Using vrlab with vscode==
==Using vrlab with vscode==


[https://code.visualstudio.com/ VScode] can be quite useful for [https://code.visualstudio.com/docs/remote/ssh remote development]. You can ssh to servers throught editor of VScode. Within several click, you can work on your favourite servers ([https://servicedesk.surf.nl/wiki/display/WIKI/Snellius Snellius], [https://doc.dhpc.tudelft.nl/delftblue/ DelftBlue], vrlab, [https://daic.tudelft.nl/docs/ DAIC]) like working offline. However, it is quite demanding for servers to support ssh functionality of vscode. DelftBlue recommands [https://mattermost.tudelft.nl/dhpc/pl/rg5yb7epd3ybdqp1m8r3dnuita 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).  
[https://code.visualstudio.com/ VScode] can be quite useful for [https://code.visualstudio.com/docs/remote/ssh remote development]. You can ssh to servers throught editor of VScode. Within several click, you can work on your favourite servers ([https://servicedesk.surf.nl/wiki/display/WIKI/Snellius Snellius], [https://doc.dhpc.tudelft.nl/delftblue/ DelftBlue], vrlab, [https://daic.tudelft.nl/docs/ DAIC]) like working offline. However, it is quite demanding for servers to support ssh functionality of vscode. DelftBlue recommands [https://mattermost.tudelft.nl/dhpc/pl/rg5yb7epd3ybdqp1m8r3dnuita not] to use vscode for remote development due to the high load of whole university users. Snellius [https://servicedesk.surf.nl/wiki/display/WIKI/Visual+Studio+Code+for+remote+development supports] vscode functionality. Vrlab does not support vscode ssh functionality due to security reasons (''AllowTcpForwarding'' is disabled).  


If you are a big fan of using vscode as your [[wikipedia:Integrated_development_environment|IDE]], this tutorial will be helpful for you. The main route is to open [[wikipedia:Virtual_file_system|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.   
If you are a big fan of using vscode as your [[wikipedia:Integrated_development_environment|IDE]], this tutorial will be helpful for you. The main route is to open [[wikipedia:Virtual_file_system|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 [https://www.linuxtopia.org/online_books/linux_desktop_guides/gnome_2.14_user_guide/nautilus.html browser (Nautilus File Manager)], connect to the virtual file system of your favourite server ======
====== 1. open your file [https://www.linuxtopia.org/online_books/linux_desktop_guides/gnome_2.14_user_guide/nautilus.html browser (Nautilus File Manager)], connect to the virtual file system of your favourite server ======

Latest revision as of 21:28, 21 May 2024

using vrlab with vscode
last updated 2024-05-21
relates to VRLab

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 of whole university users. Snellius supports vscode functionality. Vrlab does not support vscode ssh functionality due to security reasons (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.

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!