vscode 远程登陆电脑开发
远程隧道可以让远程通过url访问到本机,并通过 vscode 的 UI 进行开发
tunnel 打开有两种方式:
- vscode 编辑器左侧

- 命令行
code tunnel
不过,我的需求是,访问远程电脑的WSL子系统…… 尝试了上面的方法失败了(第一种方法只会开启对 windows 系统的访问,第二种方法,在子系统终端运行 code tunnel 会提示没有这个子命令)
搜索了一下,似乎该需求是一个开发中的尚未实现的功能…… 老老实实用 to desk 吧……🤯
Turn on remote tunnel in vscode from Windows UI with WSL · Issue #8418 · microsoft/vscode-remote-release 这里提到有一个折衷策略,
参考资料:
- Turn on remote tunnel in vscode from Windows UI with WSL · Issue #8418 · microsoft/vscode-remote-release 里提到这是一个待开发功能
- Remote: Iteration Plan for January 2023 · Issue #7783 · microsoft/vscode-remote-release 中有 "Support "Allow Tunnel access" for the remote when connected to a SSH/WSL" 的开发计划,但是没有完成
- Support "Allow Tunnel access" for the remote when connected to a SSH/WSL remote window · Issue #7865 · microsoft/vscode-remote-release 该问题最后一次被提及是 23年4月
但是!我找到了另一个可行的解决方法!(最后没有使用,是因为发现插件之类的还需要安装,直接用 to desk 了)


之后会在浏览器中打开一个链接,这个链接格式为:https://vscode.dev/github/{username}/{reponame}/blob/master/{filename}?continueOn=1

浙公网安备 33010602011771号