2

I just updated to Windows 10 1809 and is trying to run VSCode with the WSL Ubuntu. I have deleted the legacy WSL distro and installed "Ubuntu" from Microsoft Store.

Now in VSCode, I have set the "terminal.integrated.shell.windows": "C:\Users\username\AppData\Local\Microsoft\WindowsApps\ubuntu.exe", and I can open a terminal by "New Terminal". However, when I tried to run the build task, instead of running the "make", it prints out the help information from the ubuntu.exe.

Any one has any suggestion?

Thanks!

1
  • Nevermind, it seems something was wrong with my WSL installation that the bash.exe were gone. I re-installed the WSL and it came back and now it works! Commented Dec 10, 2018 at 19:00

3 Answers 3

2

The May, 2nd 2019 announcement of "Remote Development with VS Code" proposes an official support with:

Visual Studio Code Remote - WSL

https://microsoft.github.io/vscode-remote-release/images/wsl-readme.gif

The Remote - WSL extension extension lets you use the Windows Subsystem for Linux (WSL) as your full-time development environment right from VS Code.

This new, optimized support lets you:

  • Use Windows to develop in a Linux based environment, using Linux specific toolchains and utilities.
  • Edit files located in WSL or the mounted Windows filesystem (e.g. /mnt/c).
  • Run and debug your Linux based applications on Windows, in VS Code.
Sign up to request clarification or add additional context in comments.

Comments

1

It should be:

  "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe",

2 Comments

Well, I used to use that with the legacy WSL distro, but after I delete the legacy distro, that file does not work anymore. And with the Ubuntu distro, the terminal opened is the ubuntu.exe now.
Nevermind, it seems something was wrong with my WSL installation that the bash.exe were gone. I re-installed the WSL and it came back and now it works!
1

Just to add to idanp's answer, I have the latest Ubuntu from the windows store and use this line now in settings.JSON to target the WSL bash on my win10 vscode:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe"

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.