跳到主內容

【extention】RemoteSSH

 

Running the contributed command: ‘_workbench.downloadResource‘ failed解决

1 問題描述
此前,本人參考網上教程在VS Code中配置了“Remote SSH”插件(比如 但是今天使用遇到了問題Error: Running the contributed command: '_workbench.downloadResource' failed


2 解決方案
刪除Remote Server上的~/.vscode-serverrm -rf ~/.vscode-server
在本地的VS Code中再次嘗試連接,毫無意外,這次依然是失敗的。但是這一步會在遠程服務器中生成~/.vscode-server/bin/xxx/vscode-server.tar.gz

上面的xxx的文件夾稱為Commit Id,現在利用Commit ID下載遠程連接需要的文件。

然後使用這個鏈接:https://update.code.visualstudio.com/commit:xxx/server-linux-x64/stable下載所需文件,注意鏈接中的$COMMIT_ID這幾個字符(注意$不要忘記)需要換成自己的,比如我的是2d23c42a936db1c7b3b06f918cde29561cc47cd6,
下載完畢後,將下載的文件upload到Remote Server的~/.vscode-server/bin/xxx

tar -xvf stable --strip-components 1

然後使用chmod +x node server.sh

再次使用VS Code嘗試鏈接,這一步會鏈接成功


原文链接:https://blog.csdn.net/ibless/article/details/118610776