我很难弄清楚如何设置运行在Docker容器中的python应用程序(Flask)的远程调试。具体来说,我使用的是坞-撰写,PyCharm专业和python3.5。这就是我到目前为止所做的:
通过从PyCharm运行调试配置(单击bug图标),它将打印(并挂起):
Starting debug server at port 4200
Use the following code to connect to the debugger:
import pydevd
pydevd.settrace('0.0.0.0', port=4200, stdoutToServer=True, stderrToServer=True)
Waiting for process connection...我看到的码头容器日志中的...and:
无法连接到0.0.0.0: 4200
我该怎么办?(我的目标是能够在PyCharm中添加断点并停止执行docker容器应用程序,以便调试它)
发布于 2018-05-17 16:54:17
使用host.docker.internal而不是0.0.0.0。这将允许码头商决定使用哪个IP。
https://stackoverflow.com/questions/41484074
复制相似问题