问题
I am facing a strange problem when I am debugging PhpStorm, I am using XAMPP + PhpStorm + Xdebug.
I write code below and set up 4 breakpoint
<?php
$a=1;
$b=2;
$c=$a+$b;
echo $c;
After I click listener button and debug button,Chrome visit http://localhost/index.php
, the first break point is reached.
Then strange phenomenon is here:
I can not watch variables value of
$a
,$b
and$c
, no matter in debug window or I put mouse over these variables.I click F8, the left 3 breakpoints will not reach. I have no idea where is the program's step now, but I know response is not return to Chrome because Chrome is still loading.
Even stranger, if I remove all breakpoints and not click listener button and not click debug button, Chrome load success, but once I click listener button and debug button, refresh Chrome, Chrome will load forever unless I stop listen and stop debug then Chrome will load success. That is wired; I have already uncheck 'break at first line', there is no breakpoints at all. I guess PhpStorm stuck somewhere, but I do not know where it is.
Can someone help me please,the other computer can debug success but this computer never debug success.
1) Show whole Xdebug log (share the file)
Xdebug log is here:https://www.dropbox.com/s/psfktprtl2jfftq/debug2.log?dl=0
And here is a yeserday ealier bigger log:https://www.dropbox.com/s/64jnwhscatjaihq/debug2-ealier.log?dl=0
2) PHP & Xdebug versions?
PHP and Xdebug version in picture below.
xdebug log
回答1:
Xdebug 2.7 requires PhpStorm 2018.3.x or newer.
Either upgrade PhpStorm to latest stable 2018.3.x or downgrade Xdebug to 2.6.x. That will resolve the issue.
来源:https://stackoverflow.com/questions/55134987/unable-to-watch-variables-value-at-phpstorm-breakpoint