为什么我的 Netbeans Xdebug 会话在一段时间不活动后超时 [英] Why does my Netbeans Xdebug session timeout after period of inactivity

查看:29
本文介绍了为什么我的 Netbeans Xdebug 会话在一段时间不活动后超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 Netbeans 帮助我调试 Magento 应用程序的方式(在 Win 7 64 位的 XAMPP 中),但我注意到连接似乎在一段时间后超时.断点不再被击中,我不得不重新启动调试会话,这很烦人.有关如何延长或禁用调试超时的任何建议?

I love the way the Netbeans helps me to debug my Magento applications (in XAMPP on Win 7 64-bit), but I've noticed that the connection seems to timeout after a period. The breakpoints no longer get hit and I have to restart the debugging session which is annoying. Any suggestions for how to extend or disable the debug timeout?

我在 IDE 或 Xdebug php.ini 配置中看不到任何选项.Xdebug 文档指出:

I can't see any options in the IDE or Xdebug php.ini config. The Xdebug documentation states:

当 URL 变量XDEBUG_SESSION_START=名称已附加到一个 URL,Xdebug 发出一个 cookie名称XDEBUG_SESSION"并作为值XDEBUG_SESSION_START 的值网址参数.期满cookie 是一小时.cookie 是一小时.

When the URL variable XDEBUG_SESSION_START=name is appended to an URL, Xdebug emits a cookie with the name "XDEBUG_SESSION" and as value the value of the XDEBUG_SESSION_START URL parameter. The expiry of the cookie is one hour.cookie is one hour.

但不建议如何更改到期时间.

but doesn't suggest how to change the expiry time.

推荐答案

找到 php.ini 并将以下行添加到 xdebug 部分.

Find php.ini and add the following line to the xdebug section.

xdebug.remote_cookie_expire_time = 3600

该数字是 cookie 保持活动状态的时间(以秒为单位),默认为 3600(1 小时).我将它设置为 36000(10 小时),效果很好,并鼓励我偶尔重新启动该过程以释放内存.如果需要,您可以将其设置为 0(无限制),尽管我发现这会导致奇怪的冻结.

The number is the time in seconds for the cookie to remain active, which defaults to 3600 (1 hour). I set it to 36000 (10 hours), which works fine and encourages me to restart the process occasionally to free memory. You can set it to 0 (unlimited) if you want, although I found that caused odd freezes here and there.

记得重新启动 Apache 以使更改生效.

Remember to restart Apache for the change to kick in.

这篇关于为什么我的 Netbeans Xdebug 会话在一段时间不活动后超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆