代码隧道 -h 不列出选项,也不在WSL中打开隧道。

huangapple go评论45阅读模式
英文:

code tunnel -h doesn't list options and doesn't open a tunnel to WSL

问题

我正在按照guide并且注意到在Ubuntu终端窗口中,运行code tunnel -h只是启动了代码界面。使用命令面板获取URI会导致与我的Windows版本的VSCode建立隧道,而不是WSL:ubuntu(这是我关心的那个)。

如何修复这个问题?

英文:

I'm following the guide
and I am noticing that code tunnel -h in a ubuntu terminal window just launches the code UI.
Using the command palette to get the URI results in a tunnel to my Windows version of VSCode rather than the WSL:ubuntu (which is the one I care about)

How do I fix this?

答案1

得分: 1

目前看来,您需要手动在WSL中安装CLI才能使其工作。您可以在此处找到下载链接1。由于您使用的是Windows,我建议下载x64版的CLI。解压tar.gz文件后,您会得到一个名为code的文件。我建议将其移动到您的主目录以便操作。要打开隧道,请在任何位置运行./code tunnel(无论您将code文件放在哪里),以强制使用新的CLI。如果您使用code tunnel,它仍将使用Windows版本。

来源: https://github.com/microsoft/vscode/issues/171196

英文:

It appears that, for now, you need to manually install the CLI in WSL in order for it to work. The downloads can be found here. Since you are on Windows, I would recommend the x64 CLI download. When you extract the tar.gz file, you will get a file named code. I would recommend moving it to your home directory for ease. To open the tunnel, run ./code tunnel (from wherever you put the code file) to force the new CLI. If you use code tunnel it will still use the Windows version.

Source: https://github.com/microsoft/vscode/issues/171196

huangapple
  • 本文由 发表于 2023年2月6日 08:41:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/75356494.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定