【发布时间】:2018-12-27 23:59:24
【问题描述】:
我正在使用 SSH 隧道(使用 VScode 终端)并想使用 VScode 在隧道中编辑我的文件。 有人可以帮助/提供有关如何执行此操作的指南吗?我似乎无法弄清楚。我看过几篇关于使用远程 vscode 的文章
【问题讨论】:
标签: visual-studio-code vscode-settings
我正在使用 SSH 隧道(使用 VScode 终端)并想使用 VScode 在隧道中编辑我的文件。 有人可以帮助/提供有关如何执行此操作的指南吗?我似乎无法弄清楚。我看过几篇关于使用远程 vscode 的文章
【问题讨论】:
标签: visual-studio-code vscode-settings
安装 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 登录您的服务器帐户。然后你就可以在远程服务器上编辑和运行你的代码了。
【讨论】: