0

I have a long script that I need to debug using the terminal (more than 300K lines).

Unfortunately after a minute or less it gives me a time out error message before reaching a breaking point.

This is the error message I get:

Connection closed, stop debugging (<class 'socket.timeout'>, timeout('timed out',), <traceback object at 0x248c9e0>)

I use Vim in order to debug, it works fine when the break points are closer to the script's beginning.

I searched the documentation but I couldn't find where to set the time out.

UPDATE:

I use this plugin for vim and my xDebug version it's 2.1.0

4

1 回答 1

0

我设法解决了这个问题 - 在 ~/.vim/plugin/debugger.py 的第 666 行或附近

socket.setdefaulttimeout(5)

将其更改为更多

socket.setdefaulttimeout(15) 

这具有将超时从 5 秒更改为 15 秒的效果,这对我来说已经足够了,但对您而言,也许您想将其更改为

socket.setdefaulttimeout(30)

30 秒。

此外 - 等待 Xdebug 连接的 5 秒超时让我非常恼火,所以我也将其更改为 15 - 这是在我的第 556 行

serv.listen(15)

然后,我希望小连接消息也能反映这一点,所以我在第 551 行更新了这个(微不足道的)

print 'waiting for a new connection on port '+str(self.port)+' for 15 seconds...'
于 2013-08-06T09:17:14.473 回答