【问题标题】:Xdebug and No Profiling OutputXdebug 和无分析输出
【发布时间】:2011-08-05 12:08:21
【问题描述】:

这是与XDebug profiling in PHP - can't get output 类似的问题,但我的是在 Windows 上,并且我指定了完整路径(这解决了他的问题)

即使我启用了分析器,我也没有得到任何输出。下面是 xdebug 设置的副本(我已经缩进了所有未注释的选项。) - 请注意xdebug 工作正常,因为我得到了标准的 xdebug 错误。 如果有什么不同,我正在使用 xampp、cakephp、php 5.3

任何帮助将不胜感激。

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"

;xdebug.auto_trace = 0
;xdebug.collect_includes = 1
;xdebug.collect_params = 0
;xdebug.collect_return = 0
;xdebug.collect_vars = "Off"
;xdebug.default_enable = "On"
;xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD
;xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD
;xdebug.dump.COOKIE = ""
;xdebug.dump.FILES = ""
;xdebug.dump.GET = ""
;xdebug.dump.POST = ""
;xdebug.dump.REQUEST = ""
;xdebug.dump.SERVER = ""
;xdebug.dump.SESSION = ""
;xdebug.dump_globals = 1
;xdebug.dump_once = 1
;xdebug.dump_undefined = 0
;xdebug.extended_info = 1
;xdebug.file_link_format = ""
;xdebug.idekey = ""
;xdebug.manual_url = "http://www.php.net"
;xdebug.max_nesting_level = 100
;xdebug.overload_var_dump = 1
    xdebug.profiler_append = 0
    xdebug.profiler_enable = 1
    xdebug.profiler_enable_trigger = 0
    xdebug.profiler_output_dir = "C:\xampp\tmp"
    xdebug.profiler_output_name = "xdebug_profile.%R::%u"
;xdebug.remote_autostart = 0
    xdebug.remote_enable = 0
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1"
;xdebug.remote_log = "none"
;xdebug.remote_mode = "req"
    xdebug.remote_port = 9000
;xdebug.show_exception_trace = 0
;xdebug.show_local_vars = 0
;xdebug.show_mem_delta = 0
;xdebug.trace_format = 0
;xdebug.trace_options = 0
    xdebug.trace_output_dir = "C:\xampp\tmp"
;xdebug.trace_output_name = "trace.%c"
;xdebug.var_display_max_children = 128
;xdebug.var_display_max_data = 512
;xdebug.var_display_max_depth = 3

【问题讨论】:

    标签: php cakephp profiling xdebug


    【解决方案1】:

    我认为这与“xdebug.profiler_output_name”设置有关

    我复制了您的配置,但更改了“xdebug.profiler_output_name”的值,如下所示

    xdebug.profiler_output_name = "cachegrind.out.%t-%s"
    

    它工作正常,但使用您现有的“xdebug.profiler_output_name”值它没有

    我认为这是因为它不允许在输出文件名中使用冒号

    希望这有助于/解决您的问题!

    编辑: 仅供参考,以下是可用的完整设置

    [XDebug]
    zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
    xdebug.profiler_append = 0
    xdebug.profiler_enable = 1
    xdebug.profiler_enable_trigger = 0
    xdebug.profiler_output_dir = "C:\xampp\tmp"
    xdebug.profiler_output_name = "cachegrind.out.%t-%s"
    xdebug.remote_enable = 0
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1"
    xdebug.trace_output_dir = "C:\xampp\tmp"
    

    编辑 2:

    由于答案获得了很多点击,所以我想我会解释一下原因。在问题的配置文件中,output_name 包含一个 : 字符,这是 Linux 文件名中允许的字符,但 Windows 不允许。

    【讨论】:

    • 谢谢!那救了我的命。感觉是windows下的通病。
    • 工作就像一个魅力.. 我有默认的 xampp 值:“xdebug_profile.%R::%u”
    • 谢谢!!这也是我在 Windows 中的问题。奇怪的是默认的 xampp xdebug 设置不适用于 windows,你会认为他们现在已经测试或修复了它们。
    猜你喜欢
    • 2011-03-27
    • 2012-06-01
    • 1970-01-01
    • 2015-09-21
    • 1970-01-01
    • 1970-01-01
    • 2017-12-28
    • 2013-05-23
    • 2012-08-18
    相关资源
    最近更新 更多