vscode用了有几天,已经基本上手,这里记录一下当前的插件情况。

版本(今天刚好有版本更新,时间2016-09-14)

 title=

当前插件

 title=

ftp-simple:

配置config

[
    {
        "name": "224-cms-controllers",
        "host": "192.168.1.224",
        "port": 22,
        "type": "sftp",
        "username": "***",
        "password": "***",
        "path": "***/protected/controllers"
    },
    {
        "name": "224-cms-views",
        "host": "192.168.1.224",
        "port": 22,
        "type": "sftp",
        "username": "***",
        "password": "***",
        "path": "***/protected/views"
    },
    {
        "name": "217-swms-controllers",
        "host": "192.168.1.217",
        "port": 22,
        "type": "sftp",
        "username": "***",
        "password": "***",
        "path": "***/protected/controllers"
    },
    {
        "name": "217-swms-views",
        "host": "192.168.1.217",
        "port": 22,
        "type": "sftp",
        "username": "***",
        "password": "***",
        "path": "***/protected/views"
    }
]

这个插件在更新ftp上文件的时候非常方便,在左侧文件栏右键就可以进行更新删除操作

 title=

之后在命令栏选择路径就可以上传了

 title=

也可以使用命令的方法来操作,是类似的。

 title=

svn:

这个插件其实有点鸡肋,就是文件多的时候比较好用,首先本地需要装了svn,在文件栏里邮件打开svn会直接弹出svn的操作窗口,还是会方便一些的。

Visual Studio Code Settings Sync:

这个插件我真的是想着重介绍一下的,这个是一个可以同步不同电脑上vscode插件和配置的工具。

首先,去https://github.com/settings/tokens创建一个Personal access tokens,然后在vscode中输入sync去上传当前vscode的配置就可以了。

sync配置传送门http://shanalikhan.github.io/2015/12/15/Visual-Studio-Code-Sync-Settings.html

python调试配置

因为平时python2和3都有用,所以在用户配置项中配置两个命令,分别用于启动python2和3,这样我就可以方便的调试两个版本的python了

调试配置json(python2和python3是我配置的,余下是默认的)

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python3",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath3}",
            "program": "${file}",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Python2",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath2}",
            "program": "${file}",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Integrated Terminal/Console",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${file}",
            "console": "integratedTerminal",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },
        {
            "name": "External Terminal/Console",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${file}",
            "console": "externalTerminal",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },
        {
            "name": "Django",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/manage.py",
            "args": [
                "runserver",
                "--noreload"
            ],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput",
                "DjangoDebugging"
            ]
        },
        {
            "name": "Flask",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/run.py",
            "args": [],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Watson",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/console.py",
            "args": [
                "dev",
                "runserver",
                "--noreload=True"
            ],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Attach (Remote Debug)",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceRoot}",
            "remoteRoot": "${workspaceRoot}",
            "port": 3000,
            "secret": "my_secret",
            "host": "localhost"
        }
    ]
}

用户配置json,这里配置两个python,"python.pythonPath3"是python3,"python.pythonPath2"是python2

// 将设置放入此文件中以覆盖默认设置
{
    // 指向可执行的 php。
    "php.validate.executablePath": "C:/php/php.exe",

    // Python Configuration

    // Path to Python, you can use a custom version of Python by modifying this setting to include the full path.
    "python.pythonPath3": "python",
    "python.pythonPath2": "python2"

}

先写这么多

最后修改:2019 年 11 月 13 日
如果觉得我的文章对你有用,请随意赞赏