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.
Hi! I'm Derick and I work on Xdebug, PHP's debugger, as well as on PHP itself. I like languages (natural), walking, photography, and space-y things.
Open source. Open community. We are dedicated to building and enriching the PHP community.