July 1st, 2019

Take your Linux development experience in Windows to the next level with WSL and Visual Studio Code Remote

Craig Loewen
Senior Product Manager

Using VS Code Remote and the Windows Subsystem for Linux (WSL) gives you a fully featured Linux development environment on a Windows laptop or desktop. Let’s look at how using these tools will completely change how you develop with Linux tools in Windows.

First things first: Installing what you need

You will need WSL and VS Code with the VS Code Remote – WSL extension installed to complete the content in this blog post. We’ll quickly go over what both of those are, and how to install them.

The Windows Subsystem for Linux

Commonly abbreviated down to WSL, this tool lets you run unmodified Linux binaries directly on Windows. This means you can use your favorite Linux tools, command line applications and workflows on your Windows machine without having to use a complicated set up like dual booting. Best of all, WSL is a tightly integrated solution between Windows and Linux. So, if you love Linux you can access all your Windows files and executables right from the bash shell, and if you love Windows you can easily access your Linux binaries and files from PowerShell or CMD.

If you’re new to WSL and want to learn more you can complete our full course: Get started with Windows Subsystem for Linux, or you can find just the install instructions on the WSL docs.

Visual Studio Code

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity). Download and start your journey with VS Code.

You’ll also need the VS Code Remote – WSL extension, which allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. To learn more and get started please visit the VS Code Remote documentation page.

Ready, set, Linux!

Instead of writing a long section about how you get started with VS Code Remote in WSL, we have put together this quick video showcasing how to do python development in WSL using VS Code Remote.

This isn’t just isolated to python, you can use VSCode Remote and WSL on any Linux project

When using VS Code Remote in WSL, commands and extensions are run directly in the Linux distro, so you don’t have to worry about pathing issues, binary compatibility, or other cross-OS challenges. You’re able to use VS Code in WSL just as you would from Windows.

VS Code Remote and WSL are game changers when it comes to developing with Linux on Windows. These tools let you develop, run, and debug tons of Linux applications directly on your Windows machine, giving you the best of both a Windows and Linux environment.

If you want to learn more about the Windows Subsystem for Linux and everything command line in Windows, stay tuned to this blog! And if you are curious to learn more about VS Code Remote, you can read the announcement blog post here, and the extensive documentation covering the architecture here.

We are excited to bring you powerful combination of VS Code Remote and WSL!

Also in this series: An In Depth Tutorial on Linux Development on Windows with WSL and Visual Studio Code – Where we dive into the details how to get setup using WSL and VSCode Remote..

Happy Coding!

This is part 1 of our 3 part series. You can find the full series here:

Updates:

  • Updated header intro.
  • Added link to next blog post.

Author

Craig Loewen
Senior Product Manager

10 comments

Discussion is closed. Login to edit/delete existing comments.

  • Ryan Wu

    I have installed the remote development (it automatically installed Remote-WSL, Remote-SSH), however, when I use ‘ctrl+shift+P’ to open ‘Remote-WSL: new window,’ it gave the error “WSL executable not found. Please make sure that WSL is installed”, any hint to solve it? Thanks.

  • Coskun Sunali

    How about Visual Studio? Are there any plans to support the very same feature in the foreseeable future?

    • Rich TurnerMicrosoft employee

      I recommend filing issues in VSCode/WSL repos as appropriate.

  • Bertrand Thomas

    Thank you for this article!Visual Studio Code must be installed in the Linux OS (Windows Subsystem for Linux), right?

    • Craig LoewenMicrosoft employee Author

      Nope, you would install VSCode in the Windows side and install the remote extension inside of it. Check out the install instructions linked in the article! 

  • Paulo Eduardo Neves

    Excellent. It is excellent for developing a server app. What do you think about using this for data science. Would it be better to use an Anaconda a native Windows Anaconda install or to use it under WSL? Would a native Anaconda have better performance?

    • George White

      Some important tools (e.g., NCAR’s PyNGL) are not available on Windows Anaconda, so you have to hope WSL performs well enough for your use case.

    • Craig LoewenMicrosoft employee Author

      In my opinion that comes up to personal preference, I could see both being valuable. And if you’re worried about performance you can always run your python script in Windows and then again in WSL and measure which took longer!