Debugging php files in IDE using xdebug

Posted By Ashish Sharma | 23-May-2013

Debugging php Files In IDE Using XDebug

1. Download xdebug from "http://xdebug.org/download.php"

2. The downloaded file contains the dll file

3. Copy the dll file to the following path "C:\wamp\bin\php\php5.4.3\zend_ext"

4. Now open the php.ini file and add the following lines:

(php.ini file contains in both the folders that is apache and php, it is advisable to configure the file which is present in apache folder)

zend_extension = "c:/wamp/bin/php/php5.4.3/zend_ext/php_xdebug-2.2.0-5.4-vc9.dll"(use zend_extension_ts as variable name if you are using php version below 5.3)
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"

5. zend_optimizer is not compatible with xdebug so comment the line in php.ini which has a zend _optimizer written in it.

6. Make sure that "c:/wamp/tmp" exist in file system, if not then create that directory

7. Restart your apache services

8. Open your NetBeans or eclipse IDE and configure xdebug in settings

Request for Proposal

Recaptcha is required.

Sending message..