>安装brew http://brew.sh/
>安装php7 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安装php70-xdebug
>在laravel的公共文件夹中创建info.php文件:
info.php:<?php phpinfo();
>编辑文件/usr/local/etc/php7.0/conf.d/ext-xdebug.ini
的zend_extension = “在/ usr /本地的/ 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重启php70
>转到localhost / info.php,您应该可以看到xdebug.部分图片:
>设置CLI解释器. PHPStorm – >设置 – >语言与框架 – > PHP
>单击CLI解释器旁边的“…”.如果上述步骤正确完成,您应该能够看到:
>设置服务器:
运行 – >编辑配置 – > …(服务器旁边).
>设置编辑配置
运行 – >编辑配置 – > – > PHP Web应用程序.选择创建的服务器,设置名称
>在工具栏中选择已创建的服务器,然后单击“开始侦听PHP调试连接”.
>在public / index.php中设置断点
>在工具栏中单击“Debug’ServerName’”
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。