«

Xdebug.remote_autostart=1 为什么导致页面卡顿?

时间:2024-12-6 21:06     作者:emer     分类:


xdebug.remote_autostart 为何会导致卡顿?

当 xdebug.remote_autostart 设置为 1 时,在没有设置断点的情况下也会自动启动调试会话。这会导致页面卡顿,甚至是 504 错误。

解决此问题,可以通过以下方法让 xdebug 在断点处卡住,其他情况下保持流畅:

使用非 cookie 触发调试

除了使用 cookie,您还可以通过在请求中添加 xdebug_session_start 参数来触发调试。例如:

-H 'X-DEBUG-SESSION-START: PHPSTORM' 
登录后复制

参考文档:

有关 xdebug 的更多信息,请参阅以下文档:

以上就是Xdebug.remote_autostart=1 导致页面卡顿?的详细内容,!