mac 下安装 xdebug

来源:互联网 发布:靠网络挣钱 编辑:程序博客网 时间:2024/04/30 02:54

你需要安装很多东西,请按照以下顺序安装:

安装的版本包也不能错:

curl -O http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
tar -xzvf m4-1.4.13.tar.gz
cd m4-1.4.13
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
tar -xzvf autoconf-2.65.tar.gz
cd autoconf-2.65
./configure --prefix=/usr/local # ironic, isn't it?
make
sudo make install
cd ..
# here you might want to restart your terminal session, to ensure the new autoconf is picked up and used in the rest of the script
curl -O http://mirrors.kernel.org/gnu/automake/automake-1.11.tar.gz
tar xzvf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=/usr/local
make
sudo make install
cd ..
curl -O http://mirrors.kernel.org/gnu/libtool/libtool-2.2.6b.tar.gz
tar xzvf libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr/local
make
sudo make install


好了,现在去找automake管理makefile的源码就可以轻松使用了







1. 下载xdebug

2.打开终端  cd xdebug-2.2.x 切换到你解压出来的目录中


3. 执行 phpize: phpize


4. ./configure --enable-xdebug 

5. 执行编译命令 make

6. 拷贝扩展到你想要的目录中 cp modules/xdebug.so /放置扩展的路径/xdebug.so
7. 在 php.ini 中添加下列文件使xdebug扩展生效(Mac OS X下web开发常用文件所在目录

   zend_extension="/放置扩展的路径/xdebug.so"

;xdebug默认远程调试是关闭的,加上这个打开,要不没法调试
   [xdebug]
   xdebug.remote_enable=On


8. 重启apache(Mac OS X下重启apache
0 0