Tag Archives: VS Code Error

[Solved] VS Code Error: Running the contributed command: ‘_workbench.downloadResource‘ failed

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.

[Solved] VS Code Error: ((this.configurationService.getValue(…) || []).filter is not a function)

This article mainly introduces when using VS Code to create files, open folders or open new options, and use shortcut keys to report errors: ((this.configurationService.getValue(…) || []).filter is not a function) Solution.

Modify the configuration of “workbench.editorAssociations” in the settings.json file

The original configuration:

"workbench.editorAssociations": {
    "*.ipynb": "jupyter-notebook"
}

Change to:

"workbench.editorAssociations": [
        {
            "viewType": "jupyter-notebook",
            "filenamePattern": "*.ipynb"
        }
    ],

or

"workbench.editorAssociations": { 
            "*.ipynb": "jupyter.notebook.ipynb" 
        }

Note : settings.jsonFile path in Mac :~/Library/Application Support/Code/User/settings.json