无法在 PhpStorm 断点处观察变量值 [英] Unable to watch variables value at PhpStorm breakpoint

查看:44
本文介绍了无法在 PhpStorm 断点处观察变量值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调试 PhpStorm 时遇到一个奇怪的问题,我使用的是 XAMPP + PhpStorm + Xdebug.

I am facing a strange problem when I am debugging PhpStorm, I am using XAMPP + PhpStorm + Xdebug.

我在下面写代码并设置了4个断点

I write code below and set up 4 breakpoint

<?php
    $a=1;
    $b=2;
    $c=$a+$b;
    echo $c;

点击监听按钮和调试按钮后,Chrome访问http://localhost/index.php,到达第一个断点.

After I click listener button and debug button,Chrome visit http://localhost/index.php, the first break point is reached.

然后奇怪的现象来了:

  1. 我看不到 $a$b$c 的变量值,无论是在调试窗口还是我将鼠标放在这些变量上.

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

我点击F8,左边3个断点不会到达.我不知道程序的步骤现在在哪里,但我知道响应不会返回到 Chrome,因为 Chrome 仍在加载.

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.

更奇怪的是,如果我删除所有断点而不单击侦听器按钮而不单击调试按钮,Chrome 加载成功,但是一旦我单击侦听器按钮和调试按钮,刷新 Chrome,Chrome 将永远加载,除非我停止侦听并停止调试然后 Chrome 将加载成功.那是有线的;我已经取消选中在第一行中断",根本没有断点.我猜 PhpStorm 卡在某个地方,但我不知道它在哪里.

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) 显示整个 Xdebug 日志(共享文件)

1) Show whole Xdebug log (share the file)

Xdebug 日志在这里:https://www.dropbox.com/s/psfktprtl2jfftq/debug2.log?dl=0

Xdebug log is here:https://www.dropbox.com/s/psfktprtl2jfftq/debug2.log?dl=0

这里是昨天的更大日志:https://www.dropbox.com/s/64jnwhscatjaihq/debug2-ealier.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 版本?

2) PHP & Xdebug versions?

PHP 和 Xdebug 版本如下图.

PHP and Xdebug version in picture below.

调试日志

推荐答案

Xdebug 2.7 需要 PhpStorm 2018.3.x 或更新版本.

Xdebug 2.7 requires PhpStorm 2018.3.x or newer.

要么将 PhpStorm 升级到最新的稳定版 2018.3.x,要么将 Xdebug 降级到 2.6.x.这将解决问题.

Either upgrade PhpStorm to latest stable 2018.3.x or downgrade Xdebug to 2.6.x. That will resolve the issue.

这篇关于无法在 PhpStorm 断点处观察变量值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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