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

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐