Last active
March 29, 2024 19:15
-
-
Save kerbrose/e646aaf9daece42b46091e2ca0eb55d0 to your computer and use it in GitHub Desktop.
switching to debugpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Odoo: Attach", | |
"type": "python", | |
"request": "attach", | |
"port": 8879, | |
"debugServer": 8888, | |
"host": "localhost", | |
"pathMappings": [ | |
{ | |
"localRoot": "${workspaceFolder}", | |
"remoteRoot": "/mnt/extra-addons", | |
} | |
], | |
"logToFile": true | |
//"preLaunchTask": "init docker", | |
//"postDebugTask": "stop docker" | |
} | |
] | |
} | |
//docker-compose run --rm -p 8888:3001 -p 8879:8069 odoo /usr/bin/python3 -m ptvsd --host 0.0.0.0 --port 3001 /usr/bin/odoo --db_user=odoo --db_host=db --db_password=odoo | |
//docker-compose run --rm -p 8888:3001 -p 8879:8069 odoo /usr/bin/python3 -m ptvsd --host 0.0.0.0 --port 3001 /usr/bin/odoo --test-enable --db_user=odoo --db_host=db --db_password=odoo | |
//docker-compose run --rm -p 8888:3001 -p 8879:8069 odoo /usr/bin/python3 -m debugpy --listen 0.0.0.0:3001 /usr/bin/odoo --db_user=odoo --db_host=db --db_password=odoo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "init docker", | |
"type": "shell", | |
"command": "docker-compose run -d -p 8888:3001 -p 8879:8069 odoo /usr/bin/python3 -m ptvsd --host 0.0.0.0 --port 3001 /usr/bin/odoo --db_user=odoo --db_host=db --db_password=odoo" | |
}, | |
{ | |
"label": "stop docker", | |
"type": "shell", | |
"command": "docker rm -f $(docker ps -a -q --filter ancestor=docker.core-bpo.net/dev/odoo/digital_wellnez --format='{{.ID}}')", | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there, thanks for the input !
The issue is that it doesn't seem to allow for an easy debugging process using Odoo source code alongside custom modules. Here's what I tried, without success.