Xdebug, Zend Server CE and Widows 7

Trying to get Xdebug working to enable PHPUnit’s code coverage ability. Here’s how I got it working:

Download the Xdebug dll from http://www.xdebug.org/download.php, you can find the information about which compiler was used and wether thread safety was enabled in phpinfo().
In theory you could place this dll anywhere on your system, since you’re installing it as a zend_extension, you are obligated to provide the full path. Albeit it is probably best to put it somewhere in the Zend Server installation directory. I myself put it in the default, which you can probably find at the end of your php.ini file, under the [Zend] section, in the extension_dir directive. But even if you put it in that directory, you will still have to give it the full path later on. The extension dir only refers to regular extensions, not zend_extensions.

For configuring the setup I recommend going through the ini files themselves, as the ZendServer’s webinterface gave me some problems, as to setting the directives in the php.ini to extension instead of zend_extension.

Add the following to the bottom of the [Zend] section in the php.ini, with the correct path ofcource:


In order for this to work correctly we need to disable the Zend Debugger and Optimizer (for some reason…). Go to Zend\ZendServer\etc\cfg\debugger.ini and delete the following line:


in the optimizerplus.ini file, in the same dir, delete and change the following lines:

; delete or comment this one
; change this one's value to 0

Restart apache (or just php will do) and check you phpinfo() if it has an xdebug section.