参考网页:php
xampp 通常会自带 xdebug, 能够在安装文件夹下搜索 xdebug 进行查找。当 xampp 安装包里**无 xdebug **的时候,对于 Windows 系统,能够直接从这里选择合适的版本安装,对于 Linux 系统,则要自行编译了。下面简介自行编译的方法。git
$ git clone git://github.com/xdebug/xdebug.git
也可到 https://github.com/xdebug/xdebug/releases 下载最新稳定版本。github
下载后,进入 xdebug 文件夹。若是存在 git,能够切换到稳定开发分支,固然也能够不切换。本文是切换了的。bash
$ cd /path/to/xdebug $ git checkout XDEBUG_2_4_1 HEAD is now at 02a6ecd... Go with 2.4.1 $ git branch * (HEAD detached at XDEBUG_2_4_1) master
解释debug
$
开头的是命令语句,其余开头的为执行结果。$ /opt/lampp/bin/phpize
弹出异常缺乏 autoconf
,须要安装 yum install m4 autoconf
才能够继续进行。code
$ ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config
这里须要指出的是 php-config 在安装包中的位置。开发
$ make
生成的文件夹在 ./modules/xdebug.so。该 xdebug 怎么使用,见本书上面说明。get