I am trying to run a Python project on the WSL (Ubuntu-18.04 distribution) system with VS code. I have the WSL - Remote plugin v0.39.9 installed. When run the command: Show
Receive the error:
When I ran inside the VS Code trying to connect to the WSL instance:
This is the information of VS Code:
asked Nov 5, 2019 at 22:10
Jose RodriguezJose Rodriguez 9,42413 gold badges34 silver badges50 bronze badges 6 I solved this problem by shutting down
answered Sep 13, 2020 at 18:39
DougDoug 13.2k16 gold badges70 silver badges104 bronze badges 5 Can the problem be that you have an outdated VS Code Server on your WSL and have docker (instead of a Linux version) selected as your default WSL distro? Solution: 1. Open PowerShell and run
If not, run in PowerShell 2. When you have the correct WSL distro selected, open VSCode, press 3. I had a similar problem that occurred after updating VSCode. I recognized it when I tried to open VSCode from Ubuntu and received the following error:
answered Jun 29, 2021 at 8:28
KotkaKotka 3613 silver badges8 bronze badges 2 I had the same problem, and turns out that I had as default
Then, the command executed by the WSL vscode extension will ask for You then realize here that something extra needs to be done and it won't work out-of-the-box. You may select or install your desired wsl using: and that will take you to the microsoft store. I would recommend installing the Alpine distro that's the lighweight you may find. answered Dec 8, 2021 at 18:09
SebastianSebastian 4,0052 gold badges39 silver badges41 bronze badges This works for me too
Then, I reopened my VS and opened my remote folders. This might happen because you abruptly shut down your computer. In my case, I closed my laptop lid while I could still hear the fan. answered Jun 12 at 1:58
Installing Ubuntu via Microsoft Store may result in version 1. In this case trying to open a remote window may cause to end up with
Restart does not help you here. Then check the WSL version.
And if it is
It take some time to convert the version. When the process complete remote window opens successully. answered yesterday
Mx.WolfMx.Wolf 5585 silver badges11 bronze badges How do I enable VS Code in WSL?From VS Code
Start VS Code. Press F1, select Remote-WSL: New Window for the default distro or Remote-WSL: New Window using Distro for a specific distro. Use the File menu to open your folder.
Can you use WSL in VS Code?To get started with using WSL in VS Code, you'll need to download the Remote - WSL extension from the Extension Marketplace. You'll also need WSL and a Linux distribution installed. We recommend using WSL 2, which is the newest version of WSL, as you will benefit from significant performance advantages over WSL 1.
Does Visual Studio work with WSL?Visual Studio's WSL 2 toolset allows you to use Visual Studio to build and debug C++ code on WSL 2 distros without adding a SSH connection. You can already build and debug C++ code on WSL 1 distros using the native WSL 1 toolset introduced in Visual Studio 2019 version 16.1.
How do I open VS Code in Ubuntu WSL?Working with Visual Studio Code on Ubuntu on WSL2. Install Ubuntu on WSL2.. Install Visual Studio Code on Windows.. Install the Remote Development Extension.. Install Node.js and create a new project.. Creating a basic web server.. Enjoy Ubuntu on WSL!. |