Odoo_vscode调试

发布时间 2023-12-20 11:55:36作者: 手可摘星辰。

1.正常开发调试

        {
            "name": "Odoo开发调试",
            "type": "python",
            "python": "/home/wdc/work/venv/bin/python3",
            "request": "launch",
            "program": "/home/wdc/work/odoo-17.0/odoo-bin",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args": [
                "-c",
                "/home/wdc/work/odoo-17.0/odoo.conf",
            ]
        },

2.单元测试调试

        {
            "name": "Odoo单元测试调试",
            "type": "python",
            "python": "/home/wdc/work/venv/bin/python3",
            "request": "launch",
            "program": "/home/wdc/work/odoo-17.0/odoo-bin",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args": [
                "-c",
                "/home/wdc/work/odoo-17.0/odoo.conf",
                "--test-enable",
                "-d",
                "demo01",
                "-u",
                "demo",
                "--log-level",
                "test", 
                "--stop-after-init"
            ]
        },