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.

Follow

@derickr That looks great! Many times I've been in situations where this would be useful.

Sign in to participate in the conversation
PHP Community on Mastodon

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