Some brief instructions for installing the Xdebug debugger on OS X (10.4.9) running the entropy.ch binary installation of PHP.
This is a slight rewriting of Setting up Xdebug on Mac OS X by Felix Geisendörfer, the only real difference being that Felix is running the MAMP PHP installation, if you are doing likewise I would suggest Felix’s article is a better set of instructions for you!
- Run a phpinfo() page up on the local web server and find the ‘extension_dir’ entry (in the Configuration -> PHP Core section) – copy that value down (it will be something like /usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922)
- Download the latest Xdebug binaries for your OS from: http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging
- Open up the folder for the version of PHP you are running and copy the ‘xdebug.so’ file within to your extensions directory (the one you found in stage 1)
- Open your php.ini file (for the Entropy version it is at /usr/local/php5/lib/php.ini) and add the following:
[xdebug]
zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20050922/xdebug.so
(obviously substitute your extensions directory path from stage 1 if it isn’t the same as mine)
- Restart the web server
- Reload the phpinfo() page and look for the ‘Xdebug’ section – if all is working it should show up along with a whole bunch of directives
- Head back over to Felix’s article for more information on things you can do, and check out the Xdebug Documentation
Many thanks to all the developers involved in the various projects listed above but mainly to Felix Geisendörfer for writing his article – a big help for getting Xdebug running!
Update 18th February 2008
I have posted new instructions for compiling & installing Xdebug for PHP 5.2.5 (Entropy.ch build) on OS X 10.5 on x86 64bit machines
0 Comments