作者在 2013-01-18 22:44:11 发布以下内容
- git clone git://github.com/derickr/xdebug.git
- cd xdebug/
- /usr/local/php/bin/phpize
- ./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config
- make
- sudo make install
- sudo mv /usr/local/php/lib/php/extensions/no-debug-non-zts-*/xdebug.so /usr/local/php/lib/php/extensions/
-
sudo rm -rf /usr/local/php/lib/php/extensions/no-debug-non-zts-*
- sudo mkdir /usr/local/php/xdebug/
-
sudo vim /usr/local/php/etc/php.ini
在下面添加:
[Xdebug]
zend_extension ="/usr/local/php/lib/php/extensions/xdebug.so"
xdebug.profiler_enable=on
xdebug.trace_output_dir="/usr/local/php/xdebug/"
xdebug.profiler_output_dir="/usr/local/php/xdebug/"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
;xdebug.remote_host=localhost
xdebug.remote_port=9000 - 查看phpinfo(),如果搜到xdebug字样表示安装成功