I've ever gotten stuck on updating the VSCode server on my remote server because of an unstable connection between my remote server and visualstudio.com that host the updated server source codes. The download and update process failed over and over so I couldn't remotely access my remote files through VSCode. The solution is by downloading the server source codes through a host with a stable connection which in my case I downloaded from a cloud VPS server. Then I transfer the downloaded source codes as a compressed file to my remote server through SCP. Once the file had been on my remote sever, I extracted them and align the configuration. The more detailed steps are as follows.
First, we should get the commit ID of our current VSCode application by clicking on the About option on the Help menu. The commit ID is a hexadecimal number like 92da9481c0904c6adfe372c12da3b7748d74bdcb
. Then we can download the compressed server source codes as a single file from the host.
wget https://update.code.visualstudio.com/commit:92da9481c0904c6adfe372c12da3b7748d74bdcb/server-linux-x64/stable
In the next step, we can copy the file to the target server, extract it, and store it in the correct directory. The compressed file (stable) contains a folder named vscode-server-linux-x64. The extracted files which reside inside the vscode-server-linux-x64 folder should be moved into ~/.vscode-server/bin/<COMMIT_ID>
so that in my case the files should be stored inside ~/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb
.
tar -xf stable
mkdir -p ~/.vscode-server/bin
mv vscode-server-linux-x64/* ~/.vscode-server/bin/92da9481c0904c6adfe372c12da3b7748d74bdcb
The result should be something similar to this one.
Comments
Post a Comment