Vscode-remote-release: Cannot detect remote extension for WSL when opening from terminal.

Created on 25 Dec 2019  路  6Comments  路  Source: microsoft/vscode-remote-release


  • VSCode Version: 1.40.0
  • Local OS Version: Windows 10 Home 1903
  • Remote OS Version: Ubuntu 18.04 LTS
  • Remote Extension/Connection Type: WSL

Steps to Reproduce:

  1. Open WSL from bash terminal
  2. Type "code ." in terminal to open VS Code
  3. VS Code shows errors:

Unable to open '[folder name]': Unable to read file (Error: No remote extension installed to resolve wsl.).

The 'Remote - WSL' extension is recommended as you have Windows Linux Subsystem (WSL) installed on your system.


Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: [Not applicable, need extension for remote connection.]

Additional info:

When opening remote connection to WSL directly from VS Code instead of opening from terminal, connection can be established. (Or, after VS Code fails to establish connection, closing the window and opening it again will establish connection.) All extensions seem to fail when trying to establish connection through WLS terminal.

wsl

Most helpful comment

I have been struggling with the same issue today, and I was able to fix it using only this method:

  • Uninstall Code
  • Open WSL and run the following: rm ~/.vscode-server -rf
  • Open Powershell and run: Remove-Item ~/.vscode -Recurse -Force ( this will delete all your installed extensions )
  • Install VS Code again
  • open VS code and it will recommend installing WSL extension, do so.
  • restart VS code

All 6 comments

I'm having the same issue. My environment has been working fine for months and as of yesterday this is happening.

While guess here, maybe you have multiple VSCode installs and code . gets the wrong one?
Do a which code in the WSL terminal and verify that there's no other VSCode install that interferes.

From what I can tell, there appears to be just one install? (Unless I misread.) This is my result:

$ which code
/mnt/c/Program Files/Microsoft VS Code/bin/code

And like the other person, this suddenly started happening after months of everything working fine.

close and try again is fine.

I have been struggling with the same issue today, and I was able to fix it using only this method:

  • Uninstall Code
  • Open WSL and run the following: rm ~/.vscode-server -rf
  • Open Powershell and run: Remove-Item ~/.vscode -Recurse -Force ( this will delete all your installed extensions )
  • Install VS Code again
  • open VS code and it will recommend installing WSL extension, do so.
  • restart VS code

There has been some fixes in this area, do you still see the problem? If yes, please run
VSCODE_WSL_DEBUG_INFO=true code . and create me a new issue.

Was this page helpful?
0 / 5 - 0 ratings