2

我在 php.ini (Apache 2.4 / PHP 5.5 / Fedora 19) 中有以下设置:

[XDebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_mode=req
xdebug.remote_port = 9000
xdebug.remote_host = localhost
xdebug.show_local_vars=On
xdebug.dump_undefined=On
xdebug.collect_return=On
xdebug.idekey=netbeans-xdebug

xdebug.profiler_enable = 1

通过使用 PHP 信息,我可以看到 Xdebug 已加载并且所有设置指令都已正确加载。但是,我在任何地方都看不到任何 cachecgrind 输出。

我已经用一些指令尝试了很多变体,使用 /tmp 或 /var/tmp + 以及不同的文件名。目前我将其保留为默认设置。

SeLinux 被禁用。/tmp 具有适当的权限。我尝试过使用 _trigger 指令,并且默认情况下也启用了。任何地方都没有任何 cachegrind 文件,通过使用 updatedb & locate cachegrind 确认。

4

1 回答 1

1

出于某种原因,这对我有用:

xdebug.profiler_enable = on
xdebug.profiler_output_name = xdebug.out.%t
xdebug.profiler_output_dir = /var/www/projects/myproject/xdebug

我已将 profiler_output_dir 放在与我试图分析的虚拟站点相同的目录中。

于 2013-11-11T23:18:18.767 回答