Linux 下编译安装xDebug命令速记

下载xdebug-2.2.4.tgz
软件链接: http://pan.baidu.com/s/1jGHYRMA

#解压 xdebug
tar -zxvf xdebug-2.2.4.tgz

#进入xdebug源代码目录
cd xdebug-2.2.4

#执行 phpize 配置
/pathto-php/bin/phpize

#开始安装配置
./configure --prefix=/pathto-php/lib/php/extensions \
--with-php-config=/pathto-php/bin/php-config \
--enable-xdebug

#编译

make

#安装程序

make install

#配置php.ini,以启用xdebug

vi /pathto-php/etc/php.ini

#键入如下配置信息

#for non-threaded use of PHP
zend_extension=/pathto-php/lib/php/extensions/no-debug-zts-20121212/xdebug.so

#Apache 2 work MPM or the the ISAPI module
#zend_extension_ts=/pathto-php/lib/php/extensions/no-debug-zts-20121212/xdebug.so

xdebug.profiler_enable=on
xdebug.trace_output_dir="/opt/phpxdebug"
xdebug.profiler_output_dir="/opt/phpxdebug"
xdebug.show_exception_trace=On
xdebug.max_nesting_level=20
xdebug.var_display_max_depth=5

 

#重启apachectl

/pathto-apache/apachectl restart

#完成安装

可以通过phpinfo();看一下结果

大概显示如下信息:

<a target="_blank">xdebug</a>

xdebug supporte nabled

Version 2.2.4 IDE Key no value
Supported protocolsRevision

DBGp - Common DeBuGger Protocol $Revision: 1.145 $

附官网文档链接:

http://xdebug.org/docs/

posted @ 2014-08-17 17:14  yJken的博客  阅读(963)  评论(0编辑  收藏  举报