Configure xdebug with Eclipse and PDT in CentOS

Posted: July 15, 2012 in Linux, PHP
Tags: , , , ,

You can install xdebug with the below command line if pecl is installed

pecl install xdebug

Or follow the similar way in Installing mcrypt to install it yourself. Make sure you change the last step to the below in php.ini


otherwise you may receive this error: Xdebug MUST be loaded as a Zend extension.

To keep php.ini clean, in my installation, I create a new xdebug.ini in /etc/php.d/, the content is as below.



Next configure Eclipse to use xdebug as debugger.

Open Eclipse, go to Window->Preferences, expand PHP->Debug, select XDebug as PHP Debugger.

Under General->Web Browser, you can also choose use external web browser.

Save your changes and close Preferences.

Next go to Run->Debug Configurations. Under PHP Web Application, create a new configuration there. Below are my settings.

You need also configure the default PHP Server to point to your server here.

Now you start to debug your php project with xdebug.

  1. […] Posted: July 15, 2012 in Linux, PHP Tags: centos, Eclipse, pdt, php, xdebug 0 […]

  2. […] Posted: July 15, 2012 in Linux, PHP Tags: centos, Eclipse, pdt, php, xdebug 1 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s