Debugger failed with remote host
I just tried to learn how to use the debugger with PyCharm and with a simple program I always got the error:
Connection to Python debugger failed: Socket closed
I tried the suggestions given in the former posts:
add PYCHARM_DEBUG=True
environment variable to the script run configuration,
add PYDEVD_USE_CYTHON=NO environment variable to the script run configuration,
and disabled PyQT
But nothing works, many thanks for your help
请先登录再写评论。
Hi, it could be network issue. Here's some steps to troubleshoot it:
1. Reboot the system and check if the issue is still reproduced.
2. Temporarily disable any antivirus/firewall software you may have, as they may be blocking the connection.
3. Make sure that `localhost` is resolved to `127.0.0.1`. You can check this by running `ping localhost` in the terminal. Also, make sure your `hosts` file contains the following line: `127.0.0.1 localhost`.
The hosts file can be found in the following locations:
Windows: c:\windows\system32\drivers\etc\hosts
Linux/Mac: /etc/hosts
If it doesn't help, could you please reproduce the issue and provide the full console output?
Thank you for your fast answer.
Unfortunately it does not work.
here is my console output
ssh://hmuller@datasession.ifremer.fr:22/home1/datawork/hmuller/conda_env/xoa/bin/python -u /home1/datahome/hmuller/.pycharm_helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 0.0.0.0 --port 43771 --file /home1/datahome/hmuller/PYTHON_PROG/test.py
/: événement introuvable.
Process finished with exit code 1
and the log
10:10 Connection to Python debugger failed: Socket closed
Many thanks for your help
Could you please post screenshots of your interpreter settings, and also of your run/debug configuration?
many thanks, I hope it will help
Does it work if you run the file instead of debugging?
yes it runs normally without the debugger
Please try deleting `~/.pycharm_helpers` directory from the remote host and try again. Also, make sure you're using the latest PyCharm version - https://www.jetbrains.com/pycharm/download/
If this didn't help, could you please provide the full console output after reproducing the issue?
What is your remote Linux distro? Does it use SELinux by any chance?