PyCharm远程调试(pydevd)无法连接

den*_*ufa 15 python debugging remote-debugging pydev pycharm

PyCharm远程调试(pydevd)没有连接以下消息:

error: [Errno 10061] No connection could be made because the target machine actively refused it
Run Code Online (Sandbox Code Playgroud)

我该如何排除故障?

PyCharm中的输出控制台显示:

Starting debug server at port 21000
Use the following code to connect to the debugger:
import pydevd
pydevd.settrace('*.*.*.*', port=21000, suspend=False)
Waiting for process connection...
Server stopped.
Run Code Online (Sandbox Code Playgroud)

我检查了防火墙,PyCharm允许传入和传出连接.

Lud*_*rra 1

在直接链路通信中,这通常意味着您已经有某个东西连接到该端口。要检查哪个进程正在侦听哪个端口,请检查此SO 问题
然后,您可以终止该程序或更改端口,具体取决于您可以执行的操作。
如果没有“远程测试”的更多信息,很难知道发生了什么。