dongmu6225 2015-11-01 19:33
浏览 167

使用Xdebug调试PHP在__debuginfo()中崩溃

I'm trying to get Xdebug working in PhpStorm with CakePHP. The debugger stops at my breakpoints as expected, but when I step through the code, it eventually crashes. (Note: The crash occurs only if I place a breakpoint and step through the code.)

I'm working on a development machine, running:

  • Ubuntu 15.04
  • PhpStorm 9.0.2
  • CakePHP 3.0
  • Xdebug 2.3.3
  • PHP 5.6.4

Depending on where I set my breakpoint, the crash occurs in different places, but I've noticed that it always seems to trace back to code inside __debuginfo(). I read about some problems with Xdebug and __debuginfo(), but I understand they were fixed in Xdebug 2.3.3.

Here is one example: I created a project using only the CakePHP bookmarker sample. I placed a breakpoint in ~/bookmarker/webroot/index.php, and after the debugger hit my breakpoint, I stepped through the code in index.php.

This is the error message:

Error: Cannot access protected property Cake\Event\EventManager::$_listeners File/home/mriley/WebDev/bookmarker/vendor/cakephp/cakephp/src/Event/EventManager.php Line: 454

This is the method in EventManager:

449:    public function __debugInfo()
450:    {
451:        $properties = get_object_vars($this);
452:        $properties['_generalManager'] = '(object) EventManager';
453:        $properties['_listeners'] = [];
454:        foreach ($this->_listeners as $key => $listeners) {
455:            $properties['_listeners'][$key] = count($listeners) . ' listener(s)';
456:        }
457:        return $properties;
458:    }

Any ideas of what I'm doing incorrectly?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog