zleek
zleek

Reputation: 217

PhpStorm debug issue

I have the issue with the debugging application on local apache server with PhpStorm. After Apache is started the breakpoint is reached for the very first time, which is a good behavior and I can debug the part of code. However then I refresh the page in web browser and the breakpoint is not reached anymore, until I restart apache. Once apache is restarted I can reach the breakpoint - but just for the very first time.

Has anyone of you had such issue?

Upvotes: 0

Views: 237

Answers (1)

LazyOne
LazyOne

Reputation: 165471

  • 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:

Upvotes: 3

Related Questions