odoo / docker

Other
931 stars 1.51k forks source link

Pycharm Debugger #413

Open marcelogpereira opened 2 years ago

marcelogpereira commented 2 years ago

Hello, I used to work with odoo directly in my machine in order to develop custom code, but i switched to odoo docker this week. The issue is that i cannot find a way to use the pycharm debugger.

Can anyone help me with that?

trinhanhngoc commented 2 years ago

Hi @marcelopereiraarxi Are you using PyCharm Professional or PyCharm Community?

marcelogpereira commented 2 years ago

Hello @trinhanhngoc im using the PyCharm Professional

trinhanhngoc commented 2 years ago

@marcelopereiraarxi You can find the answer in this documentation: https://www.jetbrains.com/help/pycharm/using-docker-as-a-remote-interpreter.html

marcelogpereira commented 2 years ago

@trinhanhngoc thank you! i will give it a try

gdgellatly commented 2 years ago

@marcelopereiraarxi Pycharm and Odoo sucks a bit on Docker. If you want to deploy properly and just open valid ports, the stupid debugger allocates a random port. So you basically have to choose, insecure Odoo on Docker with Pycharm debug or a crappy interface trick using your localhost IP address on the docker network of your sandboxed container. Is frustrating, VSCode uses same underlying debugger and it assigns a static port and just works. Every few months I check whether I can switch back to Pycharm, but VScode for now.