加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

phpStorm / Xdebug不能显示对象的显示子数组

发布时间:2020-12-13 17:36:15 所属栏目:PHP教程 来源:网络整理
导读:我试图调试这个代码: public function removeBlankLines() { $this-qp-find('br'); } // -- break point is here 当我深入到$this对象(使用phpStorm)我看不到我感兴趣的子数组,它只显示“无法获得属性”屏幕截图: 我正在“侦听调试连接”功能.我从命令行运
我试图调试这个代码:
public function removeBlankLines() {
    $this->qp->find('br');
  } // <-- break point is here

当我深入到$this对象(使用phpStorm)我看不到我感兴趣的子数组,它只显示“无法获得属性”屏幕截图:

我正在“侦听调试连接”功能.我从命令行运行脚本. PHP版本:

[bwood@mbp ~]$php -v
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0,Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3,Copyright (c) 2002-2013,by Derick Rethans

也许相关:http://bugs.xdebug.org/view.php?id=996?

http://bugs.xdebug.org/view.php?id=686

关于如何在内部实现这样的类(SplObjectStorage,ArrayObject和类似):

this is because objects of the class SplObjectStorage are not user land PHP objects but special super duper internal ones. A similar situation will happen with many other internal PHP classes.

AFAIK在PhpStorm的一边就可以完成任务,直到xdebug能够“支持”它们.

更新:前面提到的xdebug ticket已经解决了xdebug 2.3.3(最新的稳定的xdebug版本是2.4.1),应该可以在调试器中查看这样的类.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读