Follow

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.

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

@Pol you should wait until its released. IDEs don't have support for this yet either. (they need to opt in into the feature to be on the safe side, although PhpStorm just worked right out of the box).

@derickr 👌 This looks like a really helpful enhancement. Thanks a lot for your work on XDebug.

@derickr Thanks Derick! That's really awesome! Looking forward to using that instead of having to rewrite the code or always having to step out of the function to see the result but loose the context...

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.