[英]How to use Xdebug with Laravel on Nginx with PHPStorm on Mac?
有关如何使用PHPStorm设置XDebug的指南。
版本:
本指南仅适用于PHP7,Mac El Capitan,PHPStorm 2016.3
brew install php70
安装nginx
指南 - http://learnaholic.me/2012/10/10/installing-nginx-in-mac-os-x-mountain-lion/
配置 - https://gist.github.com/kmaxat/c07795ab88677efb843686d075fafa9e
brew install php70-xdebug
在laravel的公共文件夹中创建info.php文件:
info.php: <?php phpinfo();
编辑文件/usr/local/etc/php7.0/conf.d/ext-xdebug.ini
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so" xdebug.remote_enable = 1 xdebug.remote_connect_back=1 xdebug.remote_port = 9001 xdebug.scream=0 xdebug.show_local_vars=1 xdebug.idekey=PHPSTORM
重启nginx sudo nginx -s reload
或brew services restart nginx
重启php-fpm brew services restart php70
转到localhost / info.php,你应该可以看到xdebug。 部分图片:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.