2
votes

One of the benefits of PhpStorm + Xdebug is having that console available to test methods in the context of your breakpoint. However, when using debug on the test cases, the console is occupied by the PHPUnit output and therefore cannot be used in this manner.

Is there a way to evaluate expressions from the debug console when debugging tests via PhpStorm?

1
Not too sure about debug console (never bothered to use it) and too lazy to check how it all works right now ... but you may always use "Evaluate expression" button for such stuff.LazyOne
Yeah, I had never noticed the Evaluate expression button, but it's grayed out for phpunit debugging.Devon
No idea -- seem to work just fine for me (2017.2.6; Laravel 5.5 test project; Windows 10). Share some screenshots that would show the whole IDE .. or that would allow to see some possible nuances. postimg.org/image/gzhmdafnfLazyOne
@LazyOne, not sure why it was grayed out the first time I checked but I can't reproduce it now, it does work. Pretty much works the same as the debug console except for the console keeping the output on screen. Thank you.Devon
Not from the debug console, but you can evaluate any expressions just w/ "Evaluate Expression" (Alt+F8).hakre

1 Answers

1
votes

A feature request to have console in tests debugging: https://youtrack.jetbrains.com/issue/WI-35950