Mer*_*kos 16 php windows xdebug
我使用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"
Run Code Online (Sandbox Code Playgroud)
我重新启动我的Apache,但是当我运行我的脚本时,文件夹Profile中没有生成文件.
还有什么我必须做的吗?
我已经读过,为了启用Profiler:http://xdebug.org/docs/profiler
经过一些研究,我在我的服务器中的WordPress安装中的index.php末尾添加了代码:
echo xdebug_get_profiler_filename();
Run Code Online (Sandbox Code Playgroud)
在我运行WordPress后,在页脚我得到了结果:
D:/Web Development Projects/Profile/xdebug_profile._::1320916508_018294
Run Code Online (Sandbox Code Playgroud)
但是当我去文件夹
D:/Web Development Projects/Profile/
Run Code Online (Sandbox Code Playgroud)
那个文件没有出现?任何的想法 ?
Mer*_*kos 22
问题解决了!
由于日志文件名而生成的问题.
我刚把它改成:
xdebug.profiler_output_name = "callgrind.out.%t-%s"
Run Code Online (Sandbox Code Playgroud)
并且正常工作!
Der*_*ick 16
首先,您需要确保运行Web服务器的用户实际上对您指定的目录具有写权限 - 并且它需要存在.Xdebug也可能不喜欢路径中的空格,虽然这应该可以正常工作,但我会尝试设置:
xdebug.profiler_output_dir = "D:/Web Development Projects/Profiler"
Run Code Online (Sandbox Code Playgroud)
因为\ + char可能是一个转义序列.
| 归档时间: |
|
| 查看次数: |
12014 次 |
| 最近记录: |