E
E
Eugene Zalivadnyi2019-03-29 14:20:22
Python
Eugene Zalivadnyi, 2019-03-29 14:20:22

How to set up a Python interpreter from a Docker container in PyCharm so that Debug listens for connections from the browser?

There is a Docker container. PyCharm lists its Dockerfile as a Python interpreter. Without docker, I can run the debugger and when I visit the site through a browser, I can see step by step what is happening in the code. How can I debug a browser request from a docker container?
When I run (on the start script) the docker debugger - it runs, stops at breakpoints, but exits at the end of the script. How to make Debug listen for incoming connections from the BROWSER?
Debugger console output:

beaf42281a1f:python
-u /opt/.pycharm_helpers/pydev/pydevd.py 
--multiprocess
--qt-support=auto
--port 51038 
--file /opt/project/script.py

And by the way, why is there a call to /opt/project/script.py if everything is in other folders both on the host and in the image?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alfss, 2019-03-29
@alfss

https://www.jetbrains.com/help/pycharm/using-docke... there is this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question