Unable to watch variables value at PhpStorm breakpoint

本秂侑毒 提交于 2021-02-05 08:16:47

问题


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:

  1. I can not watch variables value of $a, $b and $c, no matter in debug window or I put mouse over these variables.

  2. 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.

  3. 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.

a

b

c

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!