Remote debugging headless server (AWS P2 instance) aborted when reaching debug point
已回答
Hi,
I am trying to remote debug a deployed Python project on an AWS P2 instance.
Deployment and sync is working just sftp, and remote debugging works as well, only whenever I reach a debug point (one I set or Any Exception one) Pycharm finishes the process after printing this to console:
QXcbConnection: Could not connect to display
I understand that it's because the remote machine does not have X server. Is it possible to debug headless machines as well?
Thank you
请先登录再写评论。
Anyone from the PyCharm team can comment on this?
I have read through all documentation and existing community support thread that are relevant to the topic. I have tried setting the DISPLAY in numerous ways, as well as enabling and disabling the "include parents environment variables", but for no good. I have tried remote debugging from a Windows machine and from an Ubuntu machine, again for no good.
The remote debugging is a special feature of the paid Professional addition. Is there no way to debug a headless host?
Thank you
Hi Yonatan! It's rather old problem, and there are several workarounds in the comments of this issue: https://youtrack.jetbrains.com/issue/PY-16100
For example, try to apply the patch from this comment: https://youtrack.jetbrains.com/issue/PY-16100#comment=27-1605440. Does it help?
Thank you for your reply! I can remote now.
The specified patch did not help, as well as trying to comment imports which have only to do with graphics, but this did the trick:
https://youtrack.jetbrains.com/issue/PY-16100#comment=27-1291453