Vscode 配置开发 odoo

1,

 

launch.json文件

{
    "version": "0.2.0",
    "configurations": [


        {
            "name": "Python: Odoo",
            "type": "python",
            "request": "launch",
            "pythonPath": "${config:python.pythonPath}",
            "program": "${workspaceRoot}/source/odoo-bin",
            "args": [
                "-c",
                "${workspaceRoot}/bin/odoo.conf"
                ],
            "console": "externalTerminal",
            "cwd": "${workspaceRoot}",
            "env": {},
            "envFile": "${workspaceRoot}/runtime/python",
            "debugOptions": [
                "RedirectOutput"
            ]
        }
    ]

}

 

settings.json文件

 

{
    //定义python的路径
    "python.pythonPath": "D:\\MyCodes\\Odoo\\GOdoo12_community-20181026\\runtime\\python\\python.exe",
    //使用这个,所以自动完成/转到定义将与python扩展
    "python.autoComplete.extraPaths": [
        "${workspaceRoot}/odoo/addons",
        "${workspaceRoot}/odoo",
        "${workspaceRoot}/myaddons",
        "${workspaceRoot}/addons" ],

    "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.pep8Path”:“可选:如果您有环境路径,则使用Python的路径”,
    "python.linting.pep8Enabled": true,

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

    //下面将在编辑器中隐藏已编译的文件/添加其他文件以将其从编辑器中隐藏
    "files.exclude":{
        "**/*.pyc": true
    }
}

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值