为什么 python 调试器在使用 Pycharm 时总是在等待 113 响应时出现此超时? [英] Why python debugger always get this timeout waiting for response on 113 when using Pycharm?

查看:173
本文介绍了为什么 python 调试器在使用 Pycharm 时总是在等待 113 响应时出现此超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更大的图片

特别是我运行的代码可能运行了很长时间(大约 10 分钟),然后到达断点.python调试器总是向我显示这种错误超时等待113响应"我在屏幕截图中用红色圈出了它们.

Especially I run code perhaps running a little long time(10 mins roughly), and hit the break point. The python debugger always show me this kind of error "timeout waiting for response on 113" I circle them in red in screencut.

我使用 Pycharm 作为我的 python IDE,它只是 Pycharm IDE 的问题吗?还是 Python 调试器问题?如果不推荐Pycharm,谁能给我更好的IDE,可以高效调试.

And I use Pycharm as my python IDE, is it just issue for Pycharm IDE? Or Python debugger issue? And if Pycharm is not recommended, can anyone give me better IDE which be able to debug efficiently.

推荐答案

几个月前我也遇到过类似的事情,结果发现我在 __repr__() 中的操作非常慢 对于我在堆栈上的一个变量.当 PyCharm 遇到断点时,它会抓取当前范围内的所有变量并在它们上调用 __repr__.这是一个演示这个问题的娱乐:

I had a similar thing happen to me a few months ago, it turned out I had a really slow operation within a __repr__() for a variable I had on the stack. When PyCharm hits a breakpoint it grabs all of the variables in the current scope and calls __repr__ on them. Here's an amusement that demonstrates this issue:

import time

class Foo(object):

    def __repr__(self):
        time.sleep(100)
        return "look at me"

if __name__ == '__main__':
    a = Foo()
    print "set your breakpoint here"

PyCharm 也会调用 __getattribute__('__class__').如果你有一个行为不端的 __getattribute__ 也可能会绊倒你.

PyCharm will also call __getattribute__('__class__'). If you have a __getattribute__ that's misbehaving that could trip you up as well.

这可能不是发生在你身上的事情,但也许值得考虑.

This may not be what's happening to you but perhaps worth considering.

这篇关于为什么 python 调试器在使用 Pycharm 时总是在等待 113 响应时出现此超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆