How to configure pycharm with odoo running in docker

Viewed 1608

I have found how to configure pycharm to debug odoo, but for odoo that running in docker (my system is ubuntu 18 system), i can't configure pycharm to debug odoo container.

1 Answers

AS you said in the comment, I assume that your addons/custom_addons are in the folder attached to your container via volume mapping.

You can simply run the following command to get logs of the 'odoo_container' as

docker logs -f odoo_container

replace 'odoo_container' with your container's name.

OR

if you have configured logs directory and mapped with container's log directory like given below in docker-compose file / in your docker run command,

./logs:/var/log/odoo

then, you can run the command like

tail -f logs/odoo-server.log

It will print the console log output from either container or logs file mapped via volume to the container.

Hope this helps.

========================

Recently I have started using this tool

https://github.com/Kozea/wdb#docker

That also comes with a docker setup with Odoo container. It is superb and easy. This not only provides you the debugging but also allows you to do some operation just like python's inbuilt shell. I still use the 'tail' command to see the logs stored as a bound volume so I can go back and check the errors / bad queries / anything that is failing.

Related