Ubuntu+PHP+Apache+Xdebug 使用方法

下面是我建立xdebug的全过程(简)

1、预备
 
sudo apt-get install php5
sudo apt-get install php5-dev php5-cli
sudo apt-get install php5-xsl
sudo apt-get install perl
sudo pecl install xdebug  //顺便说一下,装redis 也可一类似
sudo apt-get install php-pear
...

2、在/etc/php5/apache/php.ini 里面添加如下
 
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.profiler_enable=On
xdebug.trace_output_dir="/data/log/xdebug"
xdebug.profiler_output_dir="/data/log/xdebug"
xdebug.default_enable=On
xdebug.collect_params=On
xdebug.remote_connect_back=On
xdebug.remote_host=10.254.58.32
xdebug.remote_port=8888
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_log="/data/log/xdebug/remote.log"
xdebug.remote_req=req
xdebug.auto_trace=Off
;xdebug.remote_autostart=On
xdebug.show_exception_trace=0
xdebug.collect_vars=On
xdebug.collect_return=On
xdebug.var_display_max_depth=15
xdebug.show_local_vars=1
xdebug.dump_undefined=1

3、重启

sudo /etc/init.d/apache2 restart
4、查看 phpinfo
 
5、完毕
 
 
posted on 2013-05-23 17:27  lsl8966  阅读(195)  评论(0编辑  收藏  举报