相关文档在 http://www.xdebug.org/docs/profiler
wget 他的最新版本
tar -zxvf ***.tar.gz
/usr/local/php/bin/phpize && ./configure –with-php-config=/usr/local/php/bin/php-config && make && make install
xdebug.so出来以后,需要用zend加载
[Xdebug]
zend_extension=”/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so”
;xdebug.profiler_enable=on
xdebug.trace_output_dir=”/var/log/xdebug”
xdebug.profiler_output_dir=”/var/log/xdebug”
xdebug.profiler_enable_trigger=1
xdebug.profiler_append = 1
用了xdebug.profiler_enable_trigger=1 以后,就需要用cookie激活,不是每个php都输出文件了
setcookie(‘XDEBUG_PROFILE’,’1′);
要想看文件 装这个 http://code.google.com/p/webgrind/
这是个用php读xdebug的工具,很酷,很好用,设置一下debug的输出地址,就可以用了,非常简单。
Recent Comments