Linux下安裝xdebug

 版本:

xdebug-2.1.0
PHP Version 5.2.9

linux下解壓xdebug包。
1、進入xdebug,在這個目錄下先運行php目錄下面的bin/phpize;

如果報錯,貌似還要裝一個autoconf
2、在運行
./configure –enable-xdebug –with-php-config=/你php的bin路徑/php-config;
3、make
好了,結束了。這是時候會在xdebug的目錄下生成 目錄modules,目錄下有xdebug.so文件,把xdebug.so複製到你想放的目錄。
4、再php的配置文件後面加上
zend_extension = “/路徑/xdebug.so”
如下:
zend_extension=”/usr/home/zhanglei11/xdebug-2.1.0/modules/xdebug.so”
xdebug.profiler_enable = on
xdebug.default_enable = on
xdebug.trace_output_dir=”/tmp/xdebug”
xdebug.trace_output_name = trace.%c.%p
xdebug.profiler_output_dir=”/tmp/xdebug”
xdebug.profiler_output_name=”cachegrind.out.%s”

也不一定是zend_extension,也可能是zend_extension_ts,或者zend_extension_debug。

5、重啓下,看phpinfo();(或者 命令行裏 ./php -m |grep debug)
PS:
官網:http://www.xdebug.org/docs/install

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章