PyCharm 2017: Remote debugging using remote interpreter doesn't work

I set up a remote interpreter and verified that I can run a script using the remote interpreter. Console output in the Run window looks like this:

    ssh://freddy@192.168.178.60:22/usr/bin/python -u /home/freddy/workspace/tensorflow/models/inception/inception/imagenet_train.py --num_gpus=2 --batch_size=64 --num_sub_batches_per_batch=2 --train_dir=/tmp/imagenet_train --data_dir=/media/data/imagenet

The script 'imagenet_train.py' works fine.

However when I start the remote interpreter in debug mode, nothing happens:

1. I do not get a debug window

2. The debug icon remains gray after I clicked it to start debugging

There is no other output what so ever.

The only clue I have is (and this already shows at start up of Pycharm) a error message in the 'Python console' :

    Error:Failed to add remote port forwarding

Any input to how to get my remote debugging going is appreciated.

0
3 comments
Comment actions
 

Ok, so I found my solution. The error in my Python console let me to it ('Error:Failed to add remote port forwarding').

On my Ubuntu server I had to set  'AllowTcpForwarding yes' in the ssh config file (/etc/ssh/sshd_config) and restart the SSH daemon.

Would be good if PyCharm would give an error when I start debugging that something is wrong, I didn't get any output at all.

0
Comment actions
 

I don't know what's going on, but when I have this problem, I simply restart `(File -> Invalidate Caches / Restart ...)` PyCharm and it was fixed :)

 

Restarting always helps :)

0
Comment actions
 

@huangbiubiu

Have you tried setting AllowTcpForwarding to yes as mentioned above?

0

Please sign in to leave a comment.

posted @   邱明成  阅读(955)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
历史上的今天:
2018-11-01 nova scheduler 介绍
2015-11-01 java中的302和sendRedirect的区别
点击右上角即可分享
微信分享提示