英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论