第一步安装xdebug 图片中有两个xdebug不要被误导,第二个是我下载得来的, xdebug下载地址
修改php.ini 主要修改zend_extension的地址,其他的可以选用我的默认配置
[Xdebug
]
zend_extension
="D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext/php_xdebug.dll"
xdebug
.profiler_enable
=on
xdebug
.auto_trace
=on
xdebug
.collect_params
=on
xdebug
.collect_return
=on
xdebug
.trace_output_dir
="D:/debug"
xdebug
.profiler_output_dir
="D:/debug"
xdebug
.profiler_output_name
= cachegrind
.out
.%t
.%p
xdebug
.remote_port
=9100
xdebug
.remote_enable
=on
记得重启服务
phpstorm配置
1.修改xdebug默认监听端口号
2.修改PHP servers
3.添加PHP web page
4.开始调试吧
点击变红,无警告,即可 然后点击小爬虫 最终结果 完美,嘿嘿