Debugging with Xdebug
Prerequisites: Testing with PHPUnit
Xdebug is a PHP extension enabling real step-debugging in your
editor — setting breakpoints and inspecting variables at the exact
moment something goes wrong, rather than sprinkling var_dump()
calls everywhere.
; php.ini
zend_extension=xdebug
xdebug.mode=debug
xdebug.client_port=9003
Once installed and configured, VS Code or PhpStorm connects to it automatically when you start a debugging session — set a breakpoint, run the page, and execution pauses exactly there.