1.打印phpinfo -》复制所有信息-》粘贴xdebug官网下载地址:Xdebug: Downloads
2.下载xdebug.dll -》放入php扩展文件-》填写php.ini
[Xdebug]
zend_extension=D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext\php_xdebug.dll
xdebug.idekey = PHPSTROM
xdebug.mode = debug
xdebug.remote_enable=1 ;远程调试打开
xdebug.remote_handler=dbgp ;远程头请求方式
xdebug.start_with_request = yes
xdebug.client_host=127.0.0.1
xdebug.client_port = 9001 //这个端口号要和phpstorm中的保持一致,示例的端口是9001
3.设置phpstorm
4.重要:测试xdebug是否能使用,根据错误信息修改Xdebug: Documentation » All settings
5.添加php服务