1.用brew下载xdebug
.
brew install ph
p54-debug
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
2.在/etc/php.ini 中加入:
zend_extension="/usr/local/Cellar/php54-xdebug/2.2.5/xdebug.so"
3.重启apache : sudo apachectl restart
4.在Netbeans中,偏好设置->php->debug,端口也为9000。