Hypnoz
Hypnoz

Reputation: 1136

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.

Upvotes: 15

Views: 16363

Answers (3)

smm
smm

Reputation: 858

It's an old question but reply can be helpful.

Delete the .idea folder from the project root dir. It will clean up the Pycharm's database and the debugger will stop timing out. It works for me on Windows.

Upvotes: 0

kxr
kxr

Reputation: 5539

As you are on Windows, for debugging such & most things I use the good old PythonWin IDE: This IDE + Debugger runs in the same process as the debugged stuff!

This way, being in direct touch with real objects, like pdb in simple interactive shell, but having a usable GUI, is a big advantage most of the time. And this way there are no issues of transferring vast objects via repr/pickle or so between processes, no delays, no issues of timeouts etc.

If a step takes a long time, PythonWin will also simply wait and not respond before ... (unless one issues a break signal/KeyboardInterrupt via the PythonWin system tray icon).

And the interactive shell of PythonWin is also fully usable during the debugging - with namespace inside the current frame.

Upvotes: 0

moof2k
moof2k

Reputation: 1897

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.

Upvotes: 14

Related Questions