Setup Xdebug

Pre-condition : Ubuntu user, Lamp environment, vim installed

The first step is to install xdebug by using command :

sudo apt-get install php5-xdebug

Next you need to edit the php.ini file to ensure that the xdebug is being seen by the Php engine, simply edit it right in the command line using vim

sudo vim /etc/php5/apache2/php.ini

At the bottom of the file please add

#Added for xdebug
zend_extension="/usr/lib/php5/20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dpgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

Now restart the Apache by command :

sudo service apache2 restart

or if it doesnt work use :

sudo /etc/init.d/apache2 restart

Next, check by creating a php file which contains <?php phpinfo(); ?> and launch it by localhost, if it shows up as below we are done setting up xdebug


If you liked this article

Let's subscribe the updates of Scuti!
Share on Google Plus

About Anonymous

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 Comments:

Post a Comment