【发布时间】:2011-12-25 23:29:57
【问题描述】:
我使用 XAMPP 并对其进行了配置,以便为我在本地创建的每个项目提供虚拟主机。
在我的 php.ini 中,我启用了 xdebug,并且我的脚本工作正常。我的意思是任何时候有警告、通知、错误,都是由xdebug报告的。
现在我想启用 Xdebug 分析器,并且我对我的 php.ini 进行了以下更改,以允许 Xdebug 分析器生成日志文件:
; xdebug.profiler_enable
; Type: integer, Default value: 0
; Enables Xdebugs profiler which creates files in the profile output directory. Those files can be
; read by KCacheGrind to visualize your data. This setting can not be set in your script with ini_set
; ().
xdebug.profiler_enable = 1
; xdebug.profiler_output_dir
; Type: string, Default value: /tmp
; The directory where the profiler output will be written to, make sure that the user who the PHP
; will be running as has write permissions to that directory. This setting can not be set in your
; script with ini_set().
xdebug.profiler_output_dir ="D:\Web Development Projects\Profile"
我重新启动了我的 Apache,但是当我运行我的脚本时,文件夹 Profile 中没有生成任何文件。
我还有什么需要做的吗?
为了启用 Profiler,我已阅读:http://xdebug.org/docs/profiler
经过一番研究,我在我的服务器中安装的 WordPress 中的 index.php 末尾添加了该代码:
echo xdebug_get_profiler_filename();
在我运行 WordPress 之后,在页脚处我得到了结果:
D:/Web Development Projects/Profile/xdebug_profile._::1320916508_018294
但是当我去文件夹时
D:/Web Development Projects/Profile/
文件没有出现在那里?有什么想法吗?
【问题讨论】:
-
我忘了写操作系统是Windows