Saturday, May 4, 2013

Step by Step installation PHP Tools for Visual Studio and xdebug for windows

1. download "php tools for visual studio" or use Tools->Extensions and Updates

2. install extension

3. download php from http://windows.php.net/download/  ... for iis use non thread safe version

4. unzip and move folder to C:\Program Files (x86)\

5. rename folder as PHP

5.1 find php.ini-developemnt and rename php.ini. (remove -development)

6. run below commands


"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/fastCGI /+[fullPath='"C:\Program Files (x86)\PHP\php-cgi.exe"']

"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='"C:\Program Files (x86)\PHP\php-cgi.exe"',resourceType='Unspecified']


7. open visual studio, Tools->options->PHP Tools->Intepreter->Register New PHP Path

8. select  C:\Program Files (x86)\PHP folder and set php executable

9. go to site http://xdebug.org/download.php

10. download xdebug dll according to php version

11. open php.ini file and paste above code

xdebug.remote_enable=1
xdebug.remote_host=”localhost”
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”
zend_extension = C:\Program Files (x86)\PHP\ext\php_xdebug-<replace with correct version>.dll

12. hit F5

No comments:

Post a Comment