下载 xdebug 扩展
下载地址:https://windows.php.net/downloads/pecl/releases/
修改 php.ini
[XDebug]zend_extension = php_xdebug.dllxdebug.remote_enable = Onxdebug.remote_host = 127.0.0.1xdebug.remote_port = 9000 # 此处端口需要与PHPstorm中一致
配置PHPstorm
配置Debug参数(Language & Frameworks -> PHP -> Debug)
xdebug -> Debug port端口
配置服务对应的调试程序(Language & Frameworks -> PHP -> Servers)
开始调试
方法一、 在 GET 或 POST 请求中使用参数 XDEBUG_SESSION_START
方法二、 使用浏览器插件或脚本生成名为 XDEBUG_SESSION 的 COOKIE