Home  >  Article  >  Development Tools  >  How to use vscode ftp

How to use vscode ftp

angryTom
angryTomOriginal
2019-11-04 14:58:516027browse

How to use vscode ftp

vscode ftp怎么用

ftp-sync插件可以实现客户端与服务器端代码的同步

安装方法:

方法1. Ctrl+Shift+P 输入 ext install [插件关键字/名称]

方法2. Ctrl+Shift+P (或F1) 输入 Extensions, 选中 Install Extension 然后输入插件名称/关键字 

若安装不在插件商店的插件, 则可以放置到用户目录下的 .vscode/extensions 文件夹中。然后重启 VS Code 即可生效

配置 ftp-sync

然后好ftp-sync插件之后,在 Ctrl+Shift+P (或 F1) 输入 * Ftp-sync: Init *,配置服务器账号路径等信息。

{
    "remotePath": "/var/data/",
    "host": "192.168.0.78",
    "username": "your-username",
    "password": "your-password",
    "port": 22,
    "protocol": "sftp",
    "uploadOnSave": true,
    "passive": false,
    "debug": false,
    "privateKeyPath": null,
    "ignore": [
        "\\.vscode",
        "\\.git",
        "\\.idea"
    ]
}

该配置信息在当前目录的 ./.vscode/ftp-sync.json 文件中。

通过命令 Ftp-sync: Sync Local to Remote Ftp-sync: Sync Remote to Local 同步服务器端和客户端的文件。

通过命令 commit 提交修改。

相关推荐:《vscode使用教程》 

The above is the detailed content of How to use vscode ftp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn