Once we activated Apache we can install Eclipse and configure PHP for local debug
Installing Eclipse
Adding PHP support
For PHP support, install “PDT” – “PHP Development Toolkit”. Go to Help->”Install New Software”
To check if your Eclipse already have PDT installed, go to Help->Installation Details. It list all installed components: in our example – Java IDE ( installed with base Eclipse installation) and PHP add-on
Configure PHP debugger
Install Zend Debugger
sudo cp /private/etc/php.ini.default /private/etc/php.ini
<?php phpinfo(); ?>
Second search for “extension_dir” and note its value – it is where we’ll copy Zend Debugger. On my host its value is “/usr/lib/php/extensions/no-debug-non-zts-20121212″
Same result you can get by running in command line
php -i|grep extension_dir
1.) download “Zend Studio Web Debugger” from http://www.zend.com/en/products/studio/downloads#Mac%20OS and open archive. It includes
ZendDebugger (depends on php version) and dummy file used for testing. Check your PHP version with “php -v” ( i have 5.514) and copy appropriate ZendDebugger.so file to extension directory discovered above. In my case it is
sudo cp ~/Downloads/ZendDebugger-darwin10.7-x86_64/php-5.5.x/ZendDebugger.so /usr/lib/php/extensions/no-debug-non-zts-20121212
sudo cp ~/Downloads/ZendDebugger-darwin10.7-x86_64/dummy.php /Library/WebServer/Documents/
2.) Modify PHP configuration settings (/private/etc/php.ini) to activate debugger extension – add following 2 lines to the end:
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20121212/ZendDebugger.sozend_debugger.allow_hosts = 127.0.0.1
don’t forget to restart apache to activate new configuration
3.) Now is a good time to test if our configuration works: first open in http://localhost/info.php – you will see a new “Zend Debugger” section.
Now we can go back to Eclipse and check debugger here as well..
In your project , open “Debug as -> Debugger Configuration” and go to Debugger tab:
Click on “text” – if configuration right, you’ll see “Successful” message..
All set – happy debugging!
P.S.Some useful documentation also can be found at



