PhpStorm调试问题 [英] PhpStorm debug issue

查看:108
本文介绍了PhpStorm调试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用PhpStorm的本地apache服务器上调试应用程序时遇到问题.Apache启动后,第一次达到断点,这是一个很好的行为,我可以调试部分代码.但是,然后我在Web浏览器中刷新页面,并且断点不再存在,直到我重新启动apache为止.重新启动apache之后,我可以到达断点了-但只是第一次.

你们中有人遇到过这样的问题吗?

解决方案

  • PhpStorm 2020.3
  • PHP 7.2.20
  • Xdebug v2.7.2

这是在PhpStorm 2020.3中修复了 WI-51991 的结果–完成根据Xdebug作者的要求(Xdebug票证#1756 ).

严重Xdebug 2.9.3及更早版本 出现错误(票号1766)会在此特定PHP过程的剩余时间内关闭远程调试(这就是为什么只有第一个请求有效的原因)-已在Xdebug 2.9.4中修复.

解决方案:

将Xdebug升级到2.9.6或更高版本(最新版本是适用于2.x分支的Xdebug 2.9.8和适用于v3的3.0.1)–已确认可以在多个人那里正常工作.

看起来像您在Windows上.在这种情况下,请在此处获取最新版本: https://xdebug.org/download (只需获取正确的版本,我相信您需要"PHP 7.2 VC15 TS(64位)": 2.9.8 )

替代方法:继续使用以前的2020.2.4或等待2020.3.1,其中将为Xdebug v2.x实现一些解决方法( WI-57577 )- 2020.3.1预览版本已经可用;最终版本应在本月晚些时候发布.

注释:

  • PhpStorm 2020.3
  • PHP 7.2.20
  • Xdebug v2.7.2

This is a result of fixing WI-51991 in PhpStorm 2020.3 -- done on request from Xdebug author (Xdebug ticket #1756).

Sadly Xdebug 2.9.3 and older has a bug (ticket #1766) that turns off remote debugging for the remainder of the duration of this specific PHP process (that's why only first request works) -- fixed in Xdebug 2.9.4.

Solution:

Upgrade Xdebug to 2.9.6 or newer (latest versions are Xdebug 2.9.8 for 2.x branch and 3.0.1 for v3) -- it's confirmed working there by multiple people.

Looks like you are on Windows. In such case get the latest version here: https://xdebug.org/download (just get the right build, I believe you need "PHP 7.2 VC15 TS (64 bit)": v3.0.1 or 2.9.8)

Alt approach: keep using previous 2020.2.4 or wait for 2020.3.1 where some workaround will be implemented for Xdebug v2.x (WI-57577) -- 2020.3.1 Preview build is already available; final version should be released at some point later this month.

NOTES:

这篇关于PhpStorm调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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