I try using xdebug with NetBeans to debug PHP. I start debug, and NetBeans waits for ever for a connection with xdebug. I have NetBeans 6.8 (latest version) with the latest
I've read that xdebug doesn't work with the version of PHP what ships with OS X. I got it to work by updating php from version 5.4 to 5.5, using a handy package from php-osx.liip.ch, including precompiled xdebug extension. Use this command:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
Note that this will leave your default php installation intact, but disable it in httpd.conf. Your new php.ini will be at "/usr/local/php5/lib/php.ini", with the xdebug config file at "/usr/local/php5/php.d/50-extension-xdebug.ini".
Setup: OS X version 10.9.2
Sources: http://coolestguidesontheplanet.com/upgrade-to-php-5-4-or-5-5-mac-osx-10-8-mountain-lion/