Debug Magento 2 via PhpStorm + xdebug 3, code works but fails during debugging only

There is no strange exception when I debug via Eclipse or just run pages from browser. But when I debug via Phpstorm I met strange exception:

1 exception(s):
Exception #0 (Exception): Objects returned by Bss\ShoppingCartRulePerStoreView\Model\ResourceModel\Rule\Collection\Interceptor::getIterator() must be traversable or implement interface Iterator

It method:

* Implementation of \IteratorAggregate::getIterator()
* @return \ArrayIterator
public function getIterator()
return new \ArrayIterator($this->_items);

And it throws exception on $this->load(); line. It method is in the parent class.

I found that there aren't exceptions when I'm not stepping to these classes, but It's not good solution for me, because Eclipse works fine with these classes.

Why it happens and how I can resolve it?

Debug log:

1 comment
Comment actions Permalink

I Updated phpstorm to 2022.2.1 and updated xdebug to 3.1.2 and problem gone.


Please sign in to leave a comment.