php xdebug安装配置

* Xdebug 官网下载合适的Xdebug扩展文件
打开新窗口:http://xdebug.org/wizard.php 

* 下载代码编译安装

git clone git://github.com/xdebug/xdebug.git
./rebuild.sh
./configure
make
sudo make install

* 编辑php.ini

 需要开启xdebug扩展 xdebug.so 

[Xdebug]
zend_extension = "/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/Applications/XAMPP/xdebug"
xdebug.idekey = "PHPSTORM"

* 查看phpinfo,  xdebug开启了

echo '<?php echo phpinfo(); ?>' > phpinfo.php
php -S 0.0.0.0:8081 > /tmp/php-cli.log 2>&1 &
curl http://localhost:8081/phpinfo.php | grep xdebug
fg %1
# Ctrl + C
rm -f /tmp/php-cli.log

下载 Xdebug helper

http://www.cnplugins.com/down/predown.aspx?fn=1511/www.cnplugins.com_eadndfjplgieldjbigjakmdgkmoaaaoc_1_4_3_.crx

拖拽到chrome空白页

浏览器打开

扫描二维码关注公众号,回复: 2862864 查看本文章

chrome-extension://eadndfjplgieldjbigjakmdgkmoaaaoc/options.html

选择IDE phpstorm

* phpstorm 配置 Xdebug

* phpstorm设置 DBGp Proxy

IDE key: PHPSTORM

Host: localhost

Port:9000

* 添加配置,在 phpStorm 右上角,选择Edit Configurations...,然后配置站点

* 完了之后的效果

猜你喜欢

转载自blog.csdn.net/fareast_mzh/article/details/81587142
今日推荐