在Mac 上安装 xdebug

在suparCRM的人有写过这个教程。2008年10月写的。很管用。除了一个细节。同时我把这个翻译成中文。

1. 下载源码并解压

$curl http://www.xdebug.org/files/xdebug-2.1.0.tgz > xdebug.tgz

$tar -zxvf xdebug.tgz

2.编译

$cd xdebug

$phpize

$MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe
-no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe”
CXXFLAGS=”-arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch i386 -arch x86_64 -bind_at_load” ./configure –enable-xdebu

$make

$sudo make install

3.配置php.ini

$sudo cp /etc/php.ini /etc/php.ini.bak

$sudo echo “zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so” >>
/etc/php.ini

$sudo apachectl restart

完成。看看 phpinfo()吧,查 xdebug

This entry was posted in php and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>