Visual Studio Code: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Created page with "== VS Code == MS VS code is a development tool to use various languaged program on local and remote server by utilizing an open source based code-server<ref>https://github.com/coder/code-server</ref> as backend for Linux OS. Window side VS code app uses SSH to connect code-server on server side so that various local and remote plugin can work locally and remotely. == VS Code connects to remote Linux server == right|frameless # Install VS...")
 
Line 2: Line 2:
MS VS code is a development tool to use various languaged program on local and remote server by utilizing an open source based code-server<ref>https://github.com/coder/code-server</ref> as backend for [[Linux]] OS.
MS VS code is a development tool to use various languaged program on local and remote server by utilizing an open source based code-server<ref>https://github.com/coder/code-server</ref> as backend for [[Linux]] OS.


Window side VS code app uses SSH to connect code-server on server side so that various local and remote plugin can work locally and remotely.
Window side VS code uses SSH protocol to connect server side code-server so if you can ssh to the remote server on windows command prompt or powershell, that means the SSH path from window to server would no issue and ready to use VSCode's remote SSH.


== VS Code connects to remote Linux server ==
== VS Code connects to remote Linux server ==
[[File:Vscode ssh setup.png|right|frameless]]


# Install VS Code on your window  
=== Install VS Code on your window ===
# Add SSH remote server with passwordless ssh login
# Connect to the SSH server


[[File:Vscode ssh.png|frameless|388x388px]]
=== Add SSH remote server with passwordless ssh login ===
[[File:Vscode ssh setup.png|frameless|center|509x509px]]
 
=== Connect to the SSH server ===
[[File:Vscode ssh.png|frameless|626x626px]]
 
== Connection issue ==
There are many SSH connection issues on internet between window and Linux server. most common one is Websocket disconnection with 1006 error. from the inlab debugging experience the most potential reason would be in which websocket's network routing path between Window side and Server side,  since the socket disconnection issue is more common when we try SSH over VPN environment as well as unstable version of Remote SSH extension. 


== Reference ==
== Reference ==
<references />
<references />

Revision as of 18:54, 1 May 2023

VS Code

MS VS code is a development tool to use various languaged program on local and remote server by utilizing an open source based code-server[1] as backend for Linux OS.

Window side VS code uses SSH protocol to connect server side code-server so if you can ssh to the remote server on windows command prompt or powershell, that means the SSH path from window to server would no issue and ready to use VSCode's remote SSH.

VS Code connects to remote Linux server

Install VS Code on your window

Add SSH remote server with passwordless ssh login

Vscode ssh setup.png

Connect to the SSH server

Vscode ssh.png

Connection issue

There are many SSH connection issues on internet between window and Linux server. most common one is Websocket disconnection with 1006 error. from the inlab debugging experience the most potential reason would be in which websocket's network routing path between Window side and Server side, since the socket disconnection issue is more common when we try SSH over VPN environment as well as unstable version of Remote SSH extension.

Reference