remote wsl_使用WSL和Visual Studio Code Remote将您在Windows中的Linux开发经验提升到新的水平...

remote wsl

remote wsl_使用WSL和Visual Studio Code Remote将您在Windows中的Linux开发经验提升到新的水平...

首先,安装所需的东西 (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.
您将需要安装了VS Code Remote – WSL扩展名的WSL和VS Code才能完成本博客文章中的内容。 我们将快速介绍两者的含义以及如何安装它们。

Windows Linux子系统 (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.
通常缩写为WSL,此工具可让您直接在Windows上运行未修改的Linux二进制文件。 这意味着您可以在Windows计算机上使用自己喜欢的Linux工具,命令行应用程序和工作流,而无需使用复杂的设置(如双重启动)。 最重要的是,WSL是Windows和Linux之间的紧密集成解决方案。 因此,如果您喜欢Linux,则可以直接从bash shell访问所有Windows文件和可执行文件;如果您喜欢Windows,则可以从PowerShell或CMD轻松访问Linux二进制文件和文件。
If you’re new to WSL and want to learn more you can complete our full course:
如果您是WSL的新手,并且想了解更多信息,可以完成我们的完整课程: Get started with Windows Subsystem for Linux, or you can find just the install instructions Linux的Windows子系统入门 ,或者on the WSL docs. 在WSL docs上找到安装说明。

Visual Studio程式码 (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).
Visual Studio Code是一个轻量级但功能强大的源代码编辑器,可在您的桌面上运行,并且可用于Windows,macOS和Linux。 它具有对JavaScript,TypeScript和Node.js的内置支持,并具有丰富的其他语言(例如C ++,C#,Java,Python,PHP,Go)和运行时(例如.NET和Unity)扩展的生态系统。 。 Download and start your journey with 下载 VS Code. 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 – WSL扩展,该扩展允许您将容器,远程计算机或Windows Linux子系统(WSL)用作完整的开发环境。 要了解更多信息并开始使用,请访问VS Code Remote documentation page.VS Code Remote文档页面

准备好了,准备好了,Linux! (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.
我们没有撰写一长篇有关如何在WSL中使用VS Code Remote入门的文章,而是整理了这个快速视频,展示了如何使用VS Code Remote在WSL中进行python开发。

这不仅限于python,还可以在任何Linux项目上使用VSCode Remote和WSL (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.
在WSL中使用VS Code Remote时,命令和扩展直接在Linux发行版中运行,因此您不必担心路径问题,二进制兼容性或其他跨OS挑战。 您可以像在Windows中一样在WSL中使用VS Code。
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.
在Windows上使用Linux进行开发时,VS Code Remote和WSL改变了游戏规则。 这些工具使您可以直接在Windows机器上开发,运行和调试大量Linux应用程序,从而为您提供Windows和Linux环境的最佳选择。
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
如果您想了解有关Linux的Windows子系统和Windows中所有命令行的更多信息,请继续关注此博客! 而如果你是好奇,更多地了解VS码遥控,你可以阅读公告的博客文章here and the extensive documentation covering the architecture 在这里和覆盖架构的大量文件here. 在这里
We are excited to bring you powerful combination of VS Code Remote and WSL!
我们很高兴为您带来VS Code Remote和WSL的强大组合!
Happy Coding!
编码愉快!

翻译自: https://habr.com/en/company/microsoft/blog/459090/

remote wsl