VS Code’s Error: Running the contributed command:’_workbench.downloadResource’ failed Solve
1 Problem Description
2 Solution
1 Problem Description
Before this, I used the online tutorial to configure the “Remote SSH” plugin in VS Code (such as this tutorial), I It uses VS Code in Windows to connect to a remote Linux server. But today I encountered a problem Error: Running the contributed command:’_workbench.downloadResource’ failed, the screenshot is as follows:
2 Solution
Delete the ~/.vscode-server folder on the Remote Server, you can execute the rm -rf ~/.vscode-server command
on the remote Linux server and try to connect again in the local VS Code. No surprises, this time Still failed. But this step will generate the ~/.vscode-server/bin/xxx folder in the remote server, and you can see a file named vscode-server.tar.gz. The screenshot is as follows:
The folder starting with 2d above is called Commit Id, and now the Commit ID is used to download the files needed for the remote connection. For the Remote SSH plug-in of Stabe Version (Search for stable with Ctrl+F in the error window of VS Code, or Stable Version), use this link: https://update.code.visualstudio.com/commit:$COMMIT_ID/ Server-linux-x64/stable download the required files. Note that the $COMMIT_ID in the link needs to be replaced with your own. For example, mine is 2d23c42a936db1c7b3b06f918cde29561cc47cd6.
For the Insider version, download the corresponding file through the link https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/insider.
After the download is complete, upload the downloaded file to the ~/.vscode-server/bin/xxx folder of the Remote Server, delete other files at the same time, and finally use tar -xvf vscode-server-linux-x64.tar.gz- -strip-components 1 Unzip the file, as shown in the figure below:
Try to link again using VS Code, this step will link successfully.