VS Code 的远程 WSL 扩展中的 "new window" 和 VS Code window 有什么区别?
What is the difference of "new window" in VS Code's Remote WSL extension and a VS Code window?
我想为 Windows 中的应用程序使用 docker 容器,但为了能够这样做,我需要安装 WSL。我发现有一个 VS Code's Remote WSL extension,我不确定 VS Code 和远程 WSL 扩展中的 New Window
之间的区别。
示例:
VS Code 远程 WSL 扩展中的新 Window
我不熟悉以下技术:
- Docker 容器
- WSL
- VS Code 的远程 WSL 扩展
有人可以向我解释一下调用 V.S 之间的区别吗? Windows 中的代码,并调用 V.S。 WSL 中的代码?
附加信息:
为了解释我是如何走到需要问这个问题的地步的,我包括了我的部分研究。我通读了文档——(我在下面发布了一个 link)——正是它让我思考并寻求答案,以解决我上面提出的问题。
WSL运行VSCode和Windows10
的区别
在回答这个问题之前,这个问题询问了 2 个平台(Windows 10
和 "Linux when running in a Windows Subsystem"
之间的区别是什么,以及为什么需要后者Docker Containers
我需要首先确保阅读本文的人知道 WSL 是什么,首字母缩略词 W.S.L.
是什么意思,此外;我想定义 Docker
是什么。
WSL 定义:
WSL is an acronym that abbreviates the name "Windows Subsystem for Linux"
. In a nutshell, The "Windows Subsystem for Linux"
allows developers to work in a Linux (or GNU) environment while booted in the Windows 10 Operating system. All Windows10 Editions of Windows have WSL support, except or Windows 10 S
.
Docker定义:
Docker is a platform as a service, aka PaaS
that virtualizes an Operating system as an Environment for where an application can run.
那么为什么 Docker 需要 WSL?
Well technically it doesn't require WSL. If you use Ubuntu as the operating system that your machine boots to, you wouldn't need WSL, however if you are using Windows 10, you would then need WSL (Windows 10S does not support Docker or WSL). The reason WSL is needed when your using windows, is becuase Docker needs Linux, which as explained above, WSL is a means in which a Linux Environment can be used by developers when the developers machine is booted to a Windows 10 Operating System. Docker uses the Linux kernel
, as well as other parts of Linux, such as the Linux SHELL
for the platform of the containers becuase they are light weight, and less resource intensive than platforms like Windows 10.
为什么有人更喜欢使用 WSL 而不是 Windows 10 完全是基于个人意见,不会在这个答案中讨论,但是我会列举一些 WSL 与 V.S。代码,不仅仅是 windows w/o WSL 是。
差异与特点
The biggest difference between running V.S. Code inside of a Windows Subsystem that runs Linux, is that V.S. Code is by definition running in a Linux environment. In other words, if you just start V.S. Code from the start menu without using WSL to invoke it, your environment with-in the Editor will be a windows environment, consequently, you will have a windows PowerShell Console, and in WSL you will have a SHELL for a console. Because the environments are different, the tools, languages & features available to you will be different.
WSL is essentially a tool for those who like to use windows as an operating system, but need, or prefer, to use a Linux platform for development. Before WSL I, and countless others had to dual-boot Linux & windows on a partitioned HDD hard-drive, which was really a pain in the caboose. Some of the other things that WSL offers is the ability to "Share Resources", Command-line (CLI) tools, such as grep
, software like Vim
, and more.
最后的注释:
我写了很多关于 WSL 的文章,因为让我们面对现实吧,你来这里不是为了阅读 windows 与 WSL 相关的内容,而是相反。话虽如此,当开发人员调用 V.S 时,WSL 似乎在 Windows 平台之上添加了一堆东西。通过 WSL 编写代码,但这种想法是错误的,我不想给人留下这样的印象。如果您开发您一直在标准 Microsoft Windows 环境中开发您的应用程序,并且您一直这样做,那么我建议继续这样做。 WSL 适用于那些喜欢 Linux 或想利用 Linux 提供的东西(我在上面列举了一些。)
这应该会给你一个有用的想法。如果您想了解更多信息,请不要询问或搜索 WSL,只需在 Linux 环境中研究开发,通过这种方式进行研究,您将学到更多关于该主题的知识。
来源:
- Docker 上的维基百科: https://en.wikipedia.org/wiki/Docker(software)_
除了@JAY-DEV 的回答之外,我还找到了有关 WSL 中的 运行 VSCode 和 Windows 10+ 之间主要区别的文档。
The first time you try to open VS code in WSL, you'll see is a message
about "Installing VS Code Server" (the c7d83e57… number is the version
of the VS Code Server that matches the client-side tools you just
installed).
VS Code is installing a small server on the Linux side that the
desktop VS Code will then talk to. That server will then install and
host extensions in WSL, so that they run in the context of the tools
and frameworks installed in WSL.
In other words, your language extensions will run against the tools
and frameworks installed in WSL, not against what is installed on the
Windows side, as it should for the proper development experience.
回答这个问题,当在WSL中打开VS代码时,仍然安装了VS代码并且Windows中有运行并且[=中有一个VS代码服务器运行 20=] 与其通信。
参考。 https://code.visualstudio.com/docs/remote/wsl-tutorial#_run-in-wsl
我不能评论,所以我会post回答。
我想你正在训练寻找一个工具作为“Remote - Containers”扩展,这将允许你在开发时使用容器。
official documentation 可能是一个很好的起点。
很抱歉我的回答不够详细,我只是在搜索信息的过程中发现了这个vs代码扩展并发现了你的问题
我会回到这个答案并展开它。
我想为 Windows 中的应用程序使用 docker 容器,但为了能够这样做,我需要安装 WSL。我发现有一个 VS Code's Remote WSL extension,我不确定 VS Code 和远程 WSL 扩展中的 New Window
之间的区别。
示例:
VS Code 远程 WSL 扩展中的新 Window
我不熟悉以下技术:
- Docker 容器
- WSL
- VS Code 的远程 WSL 扩展
有人可以向我解释一下调用 V.S 之间的区别吗? Windows 中的代码,并调用 V.S。 WSL 中的代码?
附加信息:
为了解释我是如何走到需要问这个问题的地步的,我包括了我的部分研究。我通读了文档——(我在下面发布了一个 link)——正是它让我思考并寻求答案,以解决我上面提出的问题。
WSL运行VSCode和Windows10
的区别 在回答这个问题之前,这个问题询问了 2 个平台(Windows 10
和 "Linux when running in a Windows Subsystem"
之间的区别是什么,以及为什么需要后者Docker Containers
我需要首先确保阅读本文的人知道 WSL 是什么,首字母缩略词 W.S.L.
是什么意思,此外;我想定义 Docker
是什么。
WSL 定义:
WSL is an acronym that abbreviates the name
"Windows Subsystem for Linux"
. In a nutshell, The"Windows Subsystem for Linux"
allows developers to work in a Linux (or GNU) environment while booted in the Windows 10 Operating system. All Windows10 Editions of Windows have WSL support, except orWindows 10 S
.
Docker定义:
Docker is a platform as a service, aka
PaaS
that virtualizes an Operating system as an Environment for where an application can run.
那么为什么 Docker 需要 WSL?
Well technically it doesn't require WSL. If you use Ubuntu as the operating system that your machine boots to, you wouldn't need WSL, however if you are using Windows 10, you would then need WSL (Windows 10S does not support Docker or WSL). The reason WSL is needed when your using windows, is becuase Docker needs Linux, which as explained above, WSL is a means in which a Linux Environment can be used by developers when the developers machine is booted to a Windows 10 Operating System. Docker uses the
Linux kernel
, as well as other parts of Linux, such as theLinux SHELL
for the platform of the containers becuase they are light weight, and less resource intensive than platforms like Windows 10.
为什么有人更喜欢使用 WSL 而不是 Windows 10 完全是基于个人意见,不会在这个答案中讨论,但是我会列举一些 WSL 与 V.S。代码,不仅仅是 windows w/o WSL 是。
差异与特点
The biggest difference between running V.S. Code inside of a Windows Subsystem that runs Linux, is that V.S. Code is by definition running in a Linux environment. In other words, if you just start V.S. Code from the start menu without using WSL to invoke it, your environment with-in the Editor will be a windows environment, consequently, you will have a windows PowerShell Console, and in WSL you will have a SHELL for a console. Because the environments are different, the tools, languages & features available to you will be different.
WSL is essentially a tool for those who like to use windows as an operating system, but need, or prefer, to use a Linux platform for development. Before WSL I, and countless others had to dual-boot Linux & windows on a partitioned HDD hard-drive, which was really a pain in the caboose. Some of the other things that WSL offers is the ability to "Share Resources", Command-line (CLI) tools, such as
grep
, software likeVim
, and more.
最后的注释:
我写了很多关于 WSL 的文章,因为让我们面对现实吧,你来这里不是为了阅读 windows 与 WSL 相关的内容,而是相反。话虽如此,当开发人员调用 V.S 时,WSL 似乎在 Windows 平台之上添加了一堆东西。通过 WSL 编写代码,但这种想法是错误的,我不想给人留下这样的印象。如果您开发您一直在标准 Microsoft Windows 环境中开发您的应用程序,并且您一直这样做,那么我建议继续这样做。 WSL 适用于那些喜欢 Linux 或想利用 Linux 提供的东西(我在上面列举了一些。)
这应该会给你一个有用的想法。如果您想了解更多信息,请不要询问或搜索 WSL,只需在 Linux 环境中研究开发,通过这种方式进行研究,您将学到更多关于该主题的知识。
来源:
- Docker 上的维基百科: https://en.wikipedia.org/wiki/Docker(software)_
除了@JAY-DEV 的回答之外,我还找到了有关 WSL 中的 运行 VSCode 和 Windows 10+ 之间主要区别的文档。
The first time you try to open VS code in WSL, you'll see is a message about "Installing VS Code Server" (the c7d83e57… number is the version of the VS Code Server that matches the client-side tools you just installed).
VS Code is installing a small server on the Linux side that the desktop VS Code will then talk to. That server will then install and host extensions in WSL, so that they run in the context of the tools and frameworks installed in WSL.
In other words, your language extensions will run against the tools and frameworks installed in WSL, not against what is installed on the Windows side, as it should for the proper development experience.
回答这个问题,当在WSL中打开VS代码时,仍然安装了VS代码并且Windows中有运行并且[=中有一个VS代码服务器运行 20=] 与其通信。
参考。 https://code.visualstudio.com/docs/remote/wsl-tutorial#_run-in-wsl
我不能评论,所以我会post回答。
我想你正在训练寻找一个工具作为“Remote - Containers”扩展,这将允许你在开发时使用容器。
official documentation 可能是一个很好的起点。
很抱歉我的回答不够详细,我只是在搜索信息的过程中发现了这个vs代码扩展并发现了你的问题
我会回到这个答案并展开它。