What is Xdebug ?
Xdebug is a PHP extension which provides debugging and profiling capabilities. You can learn more about Xdebug from their documentation.
1. Download the respective php_xdebug-***.dll from their official website
2. Copy the respective xdebug dll’s into their respective PHP’s extension folder.
NOTE: If your current active PHP version is 5.3 then PHP 5.3 is located at folder Ampps\php. And rest are Ampps\php-5.*. Active PHP version are renamed as Ampps\php basically.
Extension folders location if PHP 5.3 is active:
PHP 5.2 = Ampps\php-5.2\ext
PHP 5.3 = Ampps\php\ext
PHP 5.4 = Ampps\php-5.4\ext
PHP 5.5 = Ampps\php-5.5\ext
After moving the dll’s rename them to php_xdebug.dll
(Just following the convention here not necessary though, just see to it that you give path to .dll properly in PHP Configuration)
3. Now lets configure PHP Configuration one by one. I assume your current active PHP version is PHP 5.3.
- Open AMPPS Control Center(GUI) -> PHP Tab -> Configuration
- Add the following line in the end of the file and save it.
For PHP 5.2 write,
For PHP 5.4 and PHP 5.5 write,
- Restart Apache.
You have now successfully configured Xdebug.
Verify Xdebug is installed:
- Access http://localhost/ampps/
- Click on PHP Info
- Search for “xdebug”
Now, you can do the same thing for all the PHP version or just the one you want by switching the PHP version. You can change PHP version from PHP Tab in AMPPS Application:
We have just configured Xdebug on AMPPS, now you can start debugging your code. 🙂
Hope this article was helpful.