【问题标题】:How do I configure vscode to use the same (linux) file path format as WSL?如何配置 vscode 以使用与 WSL 相同的 (linux) 文件路径格式?
【发布时间】:2020-04-16 17:57:24
【问题描述】:

File->Open 命令将显示 Windows 的资源管理器对话框屏幕,因此使用 Windows 文件路径格式 C:\abc\xyz。但是,我希望该命令可以使用 Linux 文件路径,例如 /home/foo/test.py。那可能吗?谢谢。

【问题讨论】:

    标签: linux visual-studio-code filepath windows-subsystem-for-linux


    【解决方案1】:

    您需要安装 vscode 扩展“Remote - WSL”,它会在左下角启用一个绿色小框。

    单击它将为您提供“Remote-WSL:在 WSL 中重新打开文件夹”选项 |选择 WSL 发行版,例如Ubuntu。

    注 1 - https://code.visualstudio.com/remote-tutorials/wsl/run-in-wsl 中也介绍了这方面的详细信息

    注 2 - 它可能不是必需的,但我正在使用 wsl2 技术预览更新就地运行 [“windows wsl2 docker setup”|过去一年 -> https://docs.docker.com/docker-for-windows/wsl-tech-preview/ ]。我已经准备好使用新的 wsl vm 与传出的 hyper-v vm 方法来托管 docker 服务。不要认为它需要 vscode wsl 集成才能工作。

    【讨论】:

      猜你喜欢
      • 2018-09-11
      • 1970-01-01
      • 2018-11-07
      • 2022-08-19
      • 2019-11-23
      • 2020-05-02
      • 2019-04-21
      • 2023-03-04
      • 1970-01-01
      相关资源
      最近更新 更多