微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PhpStorm环境设置Debug

PHP.ini里加入如下设置信息:

[XDebug]
zend_extension=D:\PHPstudy_pro\Extensions\PHP\PHP5.6.9nts\ext\PHP_xdebug.dll
;启用性能检测分析
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:\PHP_logs"
xdebug.show_local_vars=0
;配置端口和监听的域名
xdebug.remote_enable = On
xdebug.remote_port=9100
xdebug.remote_host="localhost"
xdebug.idekey=PHPSTORM
xdebug.remote_log="D:\PHP_logs\xdebug.log"

注意:

  • 里面的zend_extension地址要修改成自己环境下对应的地址
  • remote_port、remote_host、idekey,与PHPstorm中设置一致,等下会列出来
  • 重启PHP

PHPStorm设置:

 

 

 

 

 

 

 

 

 

最后在Run->Web Server Debug Validation打开对话框进行检测,可以看到debug是否启用成功。

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐