標籤:
http://www.cnblogs.com/qiantuwuliang/archive/2011/01/23/1942382.html
Xdebug安裝提示:如果你不清楚安裝的PHP版本,你可以通過phpinfo()函數參看,同時Xdebug也提供了phpinfo輸出資訊分析工具來協助你分析如何安裝Xdebug,只要將phpinfo輸出資訊複製提交即可,地址:Xdebug phpinfo資訊分析地址 -- http://xdebug.org/wizard.php
Instructions
- Download xdebug-2.2.6.tgz
- Unpack the downloaded file with
tar -xvzf xdebug-2.2.6.tgz
- Run:
cd xdebug-2.2.6
Run: phpize (See the FAQ if you don‘t have phpize.
As part of its output it should show:
Configuring for:...Zend Module Api No: 20090626Zend Extension Api No: 220090626
If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.
- Run:
./configure
- Run:
make
- Run:
cp modules/xdebug.so /usr/lib/php5/20090626+lfs
- Update
/etc/php5/fpm/php.ini and change the line
zend_extension = /usr/lib/php5/20090626+lfs/xdebug.so
- Restart the webserver
Xdebug部分配置選項說明
xdebug.auto_trace = 1
是否允許Xdebug跟蹤函數調用,跟蹤資訊以檔案形式儲存,預設值為0
collect_params = 1
是否允許Xdebug跟蹤函數參數,預設值為0
xdebug.collect_return = 1
是否允許Xdebug跟蹤函數傳回值,預設值為0
xdebug.profiler_enable = 1
開啟xdebug的效能分析器,以檔案形式儲存,這項配置是不能以ini_set()函數配置的,預設值為0
xdebug.profiler_output_dir
效能分析檔案的存放位置,預設值為/tmp
xdebug.profiler_output_name
效能分析檔案的命名規則,預設值為cachegrind.out.%p
xdebug.trace_output_dir
函數調用跟蹤資訊輸出檔案目錄,預設值為/tmp
xdebug.trace_output_name
函數調用跟蹤資訊輸出檔案命名規則,預設為trace.%c
PHP調試工具Xdebug安裝配置教程