Xdebug Profiler为自动预置文件创建cachegrind.out文件,但不为目标文件创建

时间:2014-03-12 00:29:56

标签: php profiling xdebug xdebug-profiler

Looking to profile my web app, I have added the following settings to my Applications php.ini file:


zend_extension                  = "C:\hqp\xampp_1.7.4\php\ext\php_xdebug.dll"
xdebug.profiler_append          = 0
xdebug.profiler_enable          = 1 
xdebug.profiler_output_dir      = "c:\hqp\xampp_1.7.4\tmp\profiles"
xdebug.profiler_output_name     = "cachegrind.out.%s"
xdebug.profiler_enable_trigger  = 1

在httpd.conf文件中,使用php值auto_prepend对文件进行auto_prepended。生成的cachegrind.out.*文件带有此文件的名称(xdebug.profiler_output_name中的%s修饰符),而不是我实际要查找的文件(例如index.php文件没有相应的{{ 1}})

知道我在这里缺少什么吗?

1 个答案:

答案 0 :(得分:0)

可能是您正在生成两个文件,第二个文件会覆盖第一个文件。

您可以在php.ini中更改以下参数:

xdebug.profiler_append=1

这应该在同一个文件中附加两个调用。 来源:https://xdebug.org/docs/profiler

xdebug.profiler_output_name = cachegrind.out.%u.%p.%r

这应该确保如果有2个文件,它们的名称应该不同。

https://xdebug.org/docs/all_settings#trace_output_name用于其他修饰符。

相关问题