使用Xdebug调试和优化PHP程序
1. 安装(简略过程)编辑php.ini,加入下面几行:
extension=php_xdebug.dll
[Xdebug]
xdebug.profiler_enable=on
xdebug.trace_output_dir="I:/Projects/xdebug"
xdebug.profiler_output_dir="I:/Projects/xdebug"
2. WinCacheGrind-下载
使用图形化界面,查看xdebug执行情况的分析文件。
<img alt="" src="http://www.sunhaibing.com/wp-content/uploads/2013/10/7d3c069da4159909b4524b1f7b4f5ade.gif" />
<img alt="" src="http://www.sunhaibing.com/wp-content/uploads/2013/10/6d00190531598d3f1607e5d0250d203d.gif" />