How to setup PHP Xdebug in Mac OSX 10.9 mavericks

PageLines- Xdebug-logo.png

As a php developer , most of the when u get an error and want to know little deep info and want to debug exact problem then xdebug extension comes handy . in this guide i will show you how to install xdebug in Mac ( 10.9 with php 5.4 ) .

My Dev Environment

  1. Mac OS 10.9.1
  2. PHP 5.4 ( inbuilt )
  3. Xcode

clone git repo :

git clone https://github.com/derickr/xdebug.git
cd xdebug
phpize
./configure --enable-xdebug
make

it will compile and create module directory inside current location
Copy Modules Directory to php extensions directory

cp -r modules/  /usr/local/xdebug

now open your php.ini file , and add this line en the end

zend_extension= /usr/local/xdebug/xdebug.so

then restart webserver

sudo apachectl restart

now create a file  with  phpinfo() function and see xdebug is listed or not.

Screen Shot 2014-01-07 at 12.06.13 pm Screen Shot 2014-01-07 at 12.09.46 pm

Tagged With : -
Show Comments( 7 )