Attaching to remote debuger

已回答

Hello,

 

I started using PyCharm recently and really happy with it. Now, I ran into the situation where I need help to understand the remote debugging process. Looking at this example https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html and https://www.jetbrains.com/help/pycharm/run-debug-configuration-python-remote-debug.html this one, I see that remote debugging is not done in standard way, where remotely you start a debug server and attach to it, but debug server is started locally and you connect to it from remote script.

Since my remote script is placed on the remote host behind firewall, I have ssh tunnel open in order to connect to some services. For the remote debugging mentioned in the links above I would have to create reverse ssh tunnel in order to have it working, which I would like to avoid.

Is there a way in PyCharm to attach to a remote debugger started with pydevd? I see only option to attach to a local process. In the configuration Remote debug works in opposite way.

Looking forward for reply!

Regards,

Nedim

0

Hi, please note that Python Remote Debug Server is not for a usual case. One has to use it when there's a script on the remote machine which can't be executed from PyCharm via SSH with basic remote interpreter support. If this is no the case you should simply set an SSH-based interpreter and use standard debug run as it's done on the local machine ignoring Remote Debug Server complexity. Could you please clarify your reasoning to stick with Remote Debug Server instead?

0
Avatar
Permanently deleted user

Hi,

Well the use-case is not that simple, otherwise I would use the classic SSH interpreter. It is script which is started locally and which initiates remote script so that is why I would like to start that remote script in the debug mode with debug server and then just attach to it.

Regards,

Nedim

0

请先登录再写评论。