Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rafael.cote's avatar

Does anyone use xdebug in the tests?

I use with browser it fine, but with PhpUnit no stopped in my breakpoint.

0 likes
4 replies
Drfraker's avatar

I use it all the time, and it's amazing. It feels so slow now when I see people on videos dd($something) to view it in the console to see what the test is doing. FWIW, I use PhpStorm's test runner for testing, not the console.

1 like
rafael.cote's avatar

Hi, @Drfraker, really debug with "dd" is very slow. I would like to use xdebug it without an IDE, but I am fighting here. Thanks for you feedback.

Drfraker's avatar

Yes! When you are debugging tests, using a debugger is a much better option that placing dd() all over. Debuggers are interactive and you can step through the code you are calling and inspect variables etc. on the fly. It is like being able to dd() wherever you want in the code and for any variable in your call stack. dd() is a one time shot, then you have to move it and update variables before you can run the code again. It is painful once you have used a debugger.

1 like

Please or to participate in this conversation.