Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why python debugger always get this timeout waiting for response on 113 when using Pycharm?

enter image description here

Bigger image

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.

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.

like image 679
Hypnoz Avatar asked Dec 18 '14 01:12

Hypnoz


People also ask

Why does PyCharm not Debug?

Faced the same issue and even tried different PyCharm versions without success. In the end the reason for debugging console not working was that somewhere in the repo sys. out and sys. stderr were being overwritten.

What does debugger do in PyCharm?

The Debug tool window shows dedicated panes for frames, variables, and watches, and the console, where all the input and output information is displayed. If you want the console to be always visible, you can drag it to one of the PyCharm window's edges.


1 Answers

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 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.

like image 183
moof2k Avatar answered Oct 02 '22 03:10

moof2k