Software:
XAMPP 1.6.6 uncompressed version.
PDT 1.0.2 release All-in-one.
XDebug 2.0.2 | Windows modules PHP 5.2.1-5.2.7.
Note that the version of Xdebug must be compatible with the PHP version in XAMPP, XAMPP 1.6.6 PHP version is 5.2.5, so use Xdebug 2.0.2 | Windows Modules PHP 5.2.1-5.2.7
Installation:
Install XAMPP
Unzip the XAMPP, run the Setup_xampp.bat under the root directory for installation
Run Xampp_start.exe boot server, enter http://localhost in browser to test
Run Xampp_stop.exe shutdown server
Install Xdebug
Rename the downloaded Php_xdebug-2.0.2-5.2.5.dll to Php_xdebug.dll and copy it to the xampp\php\ext\ directory
Modify the Xampp\apache\bin\php.ini file, find the [Zend] code snippet, and use all of the code snippet ";" Comment out, find the [XDebug] code snippet, and Zend_extension_ts,xdebug.remote_enable,xdebug.remote_host,xdebug.remote_port,xdebug.remote_ Handler front of the ";" annotation character removed
Run Xampp_start.exe start the server, enter http://localhost/xampp/phpinfo.php in the browser, find the string xdebug, if you can find it, the installation is successful.
Why should I comment out [Zend] code snippets? Because the Zend Optimizer and Xdebug 2.0.2 are incompatible, the XAMPP startup failure is caused.
Install PDT
Unzip Pdt-all-in-one-r20080103-win32.zip, run Eclipse.exe start PDT (Note: Because Eclipse is Java-written, you need to install the JRE first)
Configure Xdebug to be used in PDT to create a new debug.php file, as follows:
<?php
function add ($a, $b) {
$result = $a + $b;
return $result;
}
echo Add (4, 5);
?>