Axel Borja Axel Borja - 26 days ago 29
Python Question

How can I execute my tests in Debug in PyCharm using a Docker Python Interpreter?

I configured PyCharm Python Interpreter as a remote Docker Python Interpreter:

enter image description here

I do not have any problem to run my tests using this configuration.

But when I try to run them in

Debug
, execution freeze to this
waiting for connection...
status:

enter image description here

So my questions are:


  • What am I doing bad?

  • How can I execute my tests in Debug in PyCharm using a Docker Python Interpreter ?


Answer

This problem is due to pydevd hardcoded host ip address in PyCharm sources (10.0.0.2).

So if you do not use VirtualBox to manage and run your docker-machine, you will not be able to easily launch your tests in debug.

It should be patched in PyCharm 2016.3.

Awaiting this release, a workaround exist here, on JetBrain website.

Comments