栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Pycharm远程debug常见错误汇总

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Pycharm远程debug常见错误汇总

Pycharm远程调试是一个非常好用的工具,但是远程debug的时候经常由于环境问题遇到很多问题, 这些问题虽然不是很大, 但如果不解决非常影响调试体验, 大大降低调试的效率。 有些问题解决起来特别麻烦, 虽然网上也有很多解决方案, 但经常不能奏效, 不同环境上表现也不一样。 这里把遇到的经验总结下来, 避免重复踩坑, 希望也能帮助到大家。

1 failed to add remote port forwarding

解决办法有3个:
1 首先确认远程服务器的AllowTcpForwarding是否打开。

  • 打开/etc/ssh/sshd_config文件, 确保AllowTcpForwarding yes
  • 重启ssh服务 service sshd restart
    做了上述设置还不行的话, 试着把AllowAgentForwarding也设置为yes。
    ps: 有些环境没设置这些也是可以的, 很迷惑。 所以, 试试看吧。

2 重启Pycharm: File -> Invalidate Caches/ Restart
3 重新设置Python Interpreter
上面几种方法通常可以解决问题, 有时候需要多试几次。

2 While creating remote tunnel for SshjSshConnection( @ )@6ac86b66: localhost:63342 == localhost:63342: Global request [global req for tcpip-forward] failed

Open Help -> Find Action -> Registry:
关闭以下2个选项:
ide.ssh.library.backend.use.sshj
ide.ssh.library.backend.webDeployment.use.sshj

3 远程debug时等待很久不返回计算结果

在设置中搜索gevent, 打开gevent compatible 选项

4 Can’t run remote python interpreter: Can’t get remote credentials for deployment server xxx

可能的解决方法:
1 检查Python interpreter的path mapping是否设置对了

2 删除远程的python interpreter, 重新添加

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/864753.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号