├─addons ├─env(虛擬環境) ├─odoo ├─odoo.conf ├─odoo-bin
{ "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": [] }
{ //使用這個,因此自動完成/轉到定義將與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 } }
可使用了python
參考文檔json