- 工作目录
├─addons├─env(虚拟环境)├─odoo├─odoo.conf├─odoo-bin
- launch.json文件
{ "version": "0.2.0", "configurations": [ { "name": "odoo", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${workspaceRoot}/env/Scripts/python.exe", "program": "${workspaceRoot}/odoo-bin", "cwd": "${workspaceRoot}", "env": {}, "envFile": "${workspaceRoot}/.env", "args": [ "-c", "${workspaceRoot}/odoo.conf" ], "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] } ], "compounds": []}
- settings.json文件
{ //使用这个,所以自动完成/转到定义将与python扩展 "python.autoComplete.extraPaths": [ "${workspaceRoot}/odoo/addons", "${workspaceRoot}/odoo", "${workspaceRoot}/odoo/openerp/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 }}
-
可以使用了