Inspect function return value Follow
Xdebug/3.2 allows to inspect function return value, but I'm not sure I fully understand how it works. According to the information I found (which unfortunately seems to be all videos), you seemingly need to step into every method call in the return clause to have that triggered, which is very inconvenient:
return $this->getFoos($this->getId(), $this->getName(), $this->getBars());
Indeed, nothing else I've tried (such as putting a breakpoint in the closing bracket line) works.
Is it really how the behaviour is?
Please sign in to leave a comment.
For A calling B, put the breakpoint on the return in B. When you "step into" on the return and it goes back to A, you'll see the return value at the top of the debugger var list. If I hover over that first icon, it says "return value of last method call".
I couldn't make your instructions work (probably my fault) but playing with it made me realise what my error was. It doesn't really matter where I set my breakpoint. The key point is that I need to Step Out to see the return value. If the method has several return points, I can just set the breakpoint at method level:
Please, try setting a breakpoint and start debugging. Then push “Step into”. Then you will push “Step out” several times to see the needed result of function execution faster.