vscode 还真的挺香

# .vscode/launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "odoo",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceRoot}/odoo-bin",
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/.env",
            "args": [
                "-c",
                "${workspaceRoot}/debian/odoo.conf"
                ],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        }
    ],
    "compounds": []
}

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "odoo",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceRoot}/odoo-bin",
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/.env",
            "args": [
                "-c",
                "${workspaceRoot}/debian/odoo.conf"
                ],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        }
    ],
    "compounds": []
}
# .vscode/settings.json

{
    //使用这个,所以自动完成/转到定义将与python扩展
    "python.autoComplete.extraPaths": [
        "${workspaceRoot}/odoo/addons",
        "${workspaceRoot}/odoo", ],

    "python.linting.pylintPath": "pylint", //可选:如果您有环境路径,则使用Python的路径“
    "python.linting.enabled": true,

    //加载pylint_odoo
    "python.linting.pylintArgs": ["--load-plugins", "pylint_odoo"],
    "python.formatting.provider": "yapf",   //一键美白代码格式
    //"python.formatting.yapfPath“:”可选:如果你有环境路径,使用Python的路径“,
    //“python.linting.pycodestylePath”:“可选:如果您有环境路径,则使用Python的路径”,
    "python.linting.pycodestyleEnabled": true,

    //添加这个自动保存选项,以便在编辑时pylint会播放错误
    //它只会显示文件保存的错误
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 500,

    //下面将在编辑器中隐藏已编译的文件/添加其他文件以将其从编辑器中隐藏
    "files.exclude":{
        "**/*.pyc": true
    },
    "python.pythonPath": "C:\\Users\\20693\\AppData\\Local\\Programs\\Python\\Python35\\python.exe"
}

你可能感兴趣的:(其他)