一:首先下载xdebug扩展,我用的phpstudy直接开启
在php.ini增加配置:
[Xdebug]
zend_extension=D:/phpstudy_pro/Extensions/php/php7.3.4nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=On
xdebug.trace_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.3.4nts.xdebug.trace
xdebug.profiler_enable=On
xdebug.profiler_output_dir=D:/phpstudy_pro/Extensions/php_log/php7.3.4nts.xdebug.profiler
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey = test
xdebug.remote_enable=1
二:设置phpstorm
三:点击debug
我的接口调用需要header里面设置信息,可以下载浏览器扩展
可以在浏览器设置header信息
四:可以调试了