Looks at this! The next Xdebug release (3.2) will have an extra "return from function" debugging step, in which you can inspect the return value.

It even works with fluent APIs!

But it does need some support in IDEs, as they need to enable the feature.

I'll be working with Jetbrains and Damjan Cvetko to get this into PhpStorm and the PHP Debug Adapter for Visual Studio Code.

Tasty meal tonight! Butternut squash, goats cheese, onions and thyme. Vegetarian can be tasty!

PHP Community on Mastodon

Open source. Open community. We are dedicated to building and enriching the PHP community.