## 断点调试配置 #### 安装Xdebug xdebug官方提供了一个非常友好的安装指导 [Tailored Installation Instructions](https://xdebug.org/wizard.php)  打开上面的网站,将你的`phpinfo`页面输出的内容复制到表单中,然后点击 `Analyse my phpinfo() output`按钮提交,随后会生成一个为你的php环境定制化 的xdebug安装说明,按照步骤完成安装。  #### 配置php.ini 在php.ini配置文件的末尾添加如下内容: ``` [Xdebug] xdebug.remote_autostart=1 xdebug.default_enable=1 xdebug.remote_port=9000 xdebug.remote_host=127.0.0.1 xdebug.remote_connect_back=1 xdebug.remote_enable=1 xdebug.idekey=PHPSTORM ``` #### 配置PhpStorm 1. 打开设置窗口,选择菜单 Languages & Frameworks > PHP > Debug,确保Debug端口和php.ini中配置的一致。一般默认为9000且无需改动。  1. 设置 `DBGp Proxy`,IDE key与php.ini配置的一致  1. 设置 server,Name和Host填写你需要断点调试的域名  1. 配置断点调试站点 使用`Comand + Shift + A`快捷键搜索``Edit Configurations`,进入配置站点界面  1. 使用`Comand + Shift + A`快捷键搜索`listen`,打开断点监听  1. 为代码打上断点  #### 访问站点,PhpStorm弹窗断点调试工具 
如果这篇文章帮助到了您,可以赞助下主机费~~
赞赏