Setting Up XDebug under Microsoft Internet Information Services (IIS) 7

Published September 24th, 2011 at 11:32 AM. by Joe Prochazka

This post covers the set up of XDebug for use in debuging PHP using IIS 7 with PHP installed using FastCGI. This post does not cover the installation and configuration of IIS 7 and PHP only what to do to enable XDebug in this environment. If you have not yet installed Microsoft Internet Information Services(IIS) 7 or have yet to set up PHP on IIS 7 you may wish to check out the post I made earlier entitled Setting Up IIS 7 and PHP Using FastCGI in a Microsoft Window Environment. That post will walk you through the entire set up of IIS 7 with support for PHP running using FastCGI.

Setting up XDebug under Microsoft Internet Information Services(IIS) 7 is quite simple and straight forward to do. The XDebug web site is a great help in finding the proper .dll for your environment as well as supplying you instructions on getting XDebug integrated properly into your particular PHP installation. To get started you will need to copy the phpinfo() output from your system and submit it using the form on the Tailored Installation Instructions page. After submitting the form you will be supplied a link to download the proper XDebug .dll file for your set up and will also be presented with the instructions on what to do to enable XDebug within IIS 7. The instruction you receive from the form to enable XDebug will go something like this.

  • Download php_xdebug-.dll
  • Move the downloaded file to “C:\Program Files (x86)\PHP\v5.3\ext\
  • Update C:\Program Files (x86)\PHP\v5.3\php.ini and change the line:
  • zend_extension = C:\Program\php_xdebug-<replace with correct version>.dll
  • Restart the webserver.

You may want to however instead of only adding the single line for XDebug to the bottom of your php.ini add the following lines which supplies further settings you may need when using XDebug in conjunction with an application such as Eclipse.

zend_extension = C:\PHP\ext\php_xdebug-<replace with correct version>.dll

AdWords Ad