0

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?

3
  • Please state your PhpStorm, PHP and Xdebug versions. Solution/workaround depends on what you have got there/what you can do. Commented Dec 14, 2020 at 15:33
  • PhpStorm 2020.3 PHP 7.2.20 (cli) (built: Jul 2 2019 13:01:33) ( ZTS MSVC15 (Visual C++ 2017) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans Commented Dec 14, 2020 at 15:50
  • As a hint: try to update your environment from time to time - XDebug 2.7.2 is more than a year old, PHP 7.2.20 is also pretty outdated, and there are always bugs fixed in later versions Commented Dec 14, 2020 at 16:15

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.