美文网首页
Mac+XAMPP+PhpStorm+XDebug

Mac+XAMPP+PhpStorm+XDebug

作者: 飘逸峰 | 来源:发表于2017-04-01 11:46 被阅读0次
hanqunfengdeMacBook-Pro:XAMPP hanqunfeng$ tar -zxvf xdebug-2.5.1.tgz
hanqunfengdeMacBook-Pro:XAMPP hanqunfeng$ cd xdebug-2.5.1
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
#因为不存在autoconf命令,所以进行安装
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ brew install autoconf 
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.sierra.bottle.4.tar.gz
################################################################# 100.0%
==> Pouring autoconf-2.69.sierra.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
 /usr/local/Cellar/autoconf/2.69: 70 files, 3.0M
#重新执行phpize命令
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ ./configure --enable-xdebug
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ make && make install
hanqunfengdeMacBook-Pro:xdebug-2.5.1 hanqunfeng$ cd modules/
hanqunfengdeMacBook-Pro:modules hanqunfeng$ ll
total 520
drwxr-xr-x    4 hanqunfeng  admin     136  3 31 18:03 .
drwxr-xr-x  110 hanqunfeng  admin    3740  3 31 18:03 ..
-rw-r--r--    1 hanqunfeng  admin     798  3 31 18:03 xdebug.la
-rwxr-xr-x    1 hanqunfeng  admin  261424  3 31 18:03 xdebug.so
  • php配置XDebug
hanqunfengdeMacBook-Pro:etc hanqunfeng$ vi php.ini
[xdebug]
zend_extension="/Applications/XAMPP/xdebug-2.5.1/modules/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.idekey="PHPSTORM"
  • 验证
php -m | grep xdebug

相关文章

  • MAC+XAMPP+PhpStorm+Xdebug

    一、XAMPP XAMPP是最流行的PHP开发环境,它包含Apache、MariaDB、PHP、Perl。官网下载...

  • Mac+XAMPP+PhpStorm+XDebug

    下载XAMPP集成开发环境[我下载的版本:5.6.30],安装后的路径为/Applications/XAMPP X...

网友评论

      本文标题:Mac+XAMPP+PhpStorm+XDebug

      本文链接:https://www.haomeiwen.com/subject/acliottx.html