I had been working on a Drupal page on Linux. We need to run it on IIS, so I had to debug errors caused by moving it.
1) I downloaded Netbeans. If you don’t have JDK, you can download the bundle
http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html
2) Download XDebug for your PHP instalation.
Type in elevated command window
> cd C:\Program Files (x86)\PHP\v5.3
> php -i > out.txt
and copy content of out.txt here.
http://www.xdebug.org/find-binary.php
This page gives you tailored instructions for your situation.
For my installation, it was this:
Tailored Installation Instructions
Summary
Xdebug installed: no Server API: Command Line Interface Windows: yes – Compiler: MS VC9 – Architecture: x86 Zend Server: no PHP Version: 5.3.10 Zend API nr: 220090626 PHP API nr: 20090626 Debug Build: no Thread Safe Build: no Configuration File Path: C:\Windows Configuration File: C:\Program Files (x86)\PHP\v5.3\php.ini Extensions directory: C:\Program Files (x86)\PHP\v5.3\ext Instructions
- Download php_xdebug-2.2.0-5.3-vc9-nts.dll
- Move the downloaded file to "C:\Program Files (x86)\PHP\v5.3\ext"
- Edit
C:\Program Files (x86)\PHP\v5.3\php.iniand add the linezend_extension = "C:\Program Files (x86)\PHP\v5.3\ext\php_xdebug-2.2.0-5.3-vc9-nts.dll"
NetBeans prompted me to 4 more lines to php.ini, so I created a section like this
[zend]
zend_extension = "C:\Program Files (x86)\PHP\v5.3\php_xdebug-2.2.0-5.3-vc9-nts.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
Then I was able to debug my project that I had imported as a new project into NetBeans from existing codes.
Following website might give additional details: http://www.domainwebcenter.com/?p=936
