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

查看:123
本文介绍了为什么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天全站免登陆