使用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?