I use vim + xdebug to debug php. If the debug operation waste a long time, vim will lost the connection with xdebug, and I have to restart the debug by press <kbd>F5</kbd> and do it from the first step again. So how can I set a longer time for the debug procedure?
2条回答 默认 最新
- douwen1006 2012-04-04 17:07关注
The 5 second timeout is hard-coded in debugger.py. You can increase it by modifying the following line:
def accept(self): print 'waiting for a new connection on port '+str(self.port)+' for 5 seconds...' serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serv.bind(('', self.port)) # Set a higher timeout here... serv.listen(5) (self.sock, address) = serv.accept() except socket.timeout: serv.close() self.stop() print 'timeout' return
In my plugin version, that happens to be line 556 of debugger.py. If your differs, just search in Vim for
5
orsecond
.Update:
Also found it at line 666
def __init__(self, port = 9000, max_children = '32', max_data = '1024', max_depth = '1', minibufexpl = '0', debug = 0): """ initialize Debugger """ # Probably need to increase here too... socket.setdefaulttimeout(5) self.port = port self.debug = debug
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 stm32开发clion时遇到的编译问题
- ¥15 lna设计 源简并电感型共源放大器
- ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
- ¥15 Vue3地图和异步函数使用
- ¥15 C++ yoloV5改写遇到的问题
- ¥20 win11修改中文用户名路径
- ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
- ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
- ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
- ¥15 帮我写一个c++工程