Install Xdebug for coverage on Windows

Published at 15 Apr 2025

To install Xdebug on our Windows computer, we can use the installation wizard available on the Xdebug website at https://xdebug.org/wizard.

On the textarea we should paste the HTML source of phpinfo() or the CLI output of the php -i command.

Once we have pasted the output, and submitted it, there will be some instructions that we should follow to install it.

  1. First, we download the php_xdebug.dll to our computer.

  2. Next, we move the file to the ext folder next to our PHP installation.

  3. Finally, we update the php.ini file to enable it. Below the zend_extension = opcache line we should add the following:

zend_extension=php_xdebug.dll
xdebug.mode=debug,develop,coverage

Now we have successfully installed Xdebug on our system.