phpstudy 会默认安装好每一个php版本对应的xdebug,
我们需要打开对应php版本的php.ini文件,然后配置以下信息,然后重启服务
[xdebug]
zend_extension ="D:\phpstudy_pro\Extensions\php\php7.2.9nts\ext\php_xdebug.dll"
xdebug.remote_enable = On
;启用性能检测分析
xdebug.profiler_enable = On
;启用代码自动跟踪
xdebug.auto_trace=On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
;指定性能分析文件的存放目录
xdebug.profiler_output_dir ="D:\phpstudy_pro/tmp"
xdebug.show_local_vars=0
;配置端口和监听的域名
xdebug.remote_port=9001
xdebug.remote_host="localhost"
然后phpstom配置见如下链接,很详细
最详细的phpstorm+xdebug调试详细教程,没有之一_yinhangbbbbb的博客-CSDN博客_phpstorm xdebug