【问题标题】:How to integrate a VScode SSH Tunnel and the files如何集成 VScode SSH 隧道和文件
【发布时间】:2018-12-27 23:59:24
【问题描述】:

我正在使用 SSH 隧道(使用 VScode 终端)并想使用 VScode 在隧道中编辑我的文件。 有人可以帮助/提供有关如何执行此操作的指南吗?我似乎无法弄清楚。我看过几篇关于使用远程 vscode 的文章

【问题讨论】:

    标签: visual-studio-code vscode-settings


    【解决方案1】:

    安装 Code Runner 和 SSH-FS。 像这样配置您的用户设置

    "code-runner.runInTerminal":true,
    "code-runner.fileDirectoryAsCwd": true,
    "code-runner.ignoreSelection": true,
    "code-runner.saveFileBeforeRun": true,
    "files.eol": "\n",
    "sshfs.configs": [
        {
            "label": "label",
            //Must use the root direction "/"
            "root": "/",
            "host": "host",
            "port": port,
            "username": "name",
            "password": "password"
            "name": "name"
        }]
    

    通过 vscode 终端通过 ssh 登录您的服务器帐户。然后你就可以在远程服务器上编辑和运行你的代码了。

    【讨论】:

      猜你喜欢
      • 2023-02-14
      • 2023-01-25
      • 2020-07-31
      • 1970-01-01
      • 2017-02-27
      • 2013-08-12
      • 2023-03-17
      • 2013-04-10
      • 2014-06-02
      相关资源
      最近更新 更多