Xdebug 和无分析输出

发布于 2024-11-01 06:44:11 字数 1893 浏览 1 评论 0原文

这与 PHP 中的 XDebug 分析 - 无法获取输出 但我的是 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

This is a similar problem to XDebug profiling in PHP - can't get output but mine is on windows and I have the full path specified (which solved his problem)

I am not getting any output even though I have enabled the profiler. Below is a copy of xdebug setup (I have indented all the options that have been uncommented.) - Please note that xdebug is working fine as Ii have been getting the standard xdebug errors. If it make any difference I am using xampp, cakephp, php 5.3

Any help would be greatly appreciated.

[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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

英雄似剑 2024-11-08 06:44:11

我认为这与“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 上不允许。

I think it's to do with the "xdebug.profiler_output_name" setting

I copied your config, but changed the value of "xdebug.profiler_output_name" like below

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

And it worked OK, but with your existing value of "xdebug.profiler_output_name" it didn't

I think it's to do with it not allowing colons in the output file name

Hope this helps/solves your problem!

Edit:
Just for reference, here are the full settings that work

[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"

Edit 2:

Since the answer is getting a lot of hits, just thought I'd explain why. In the config file in the question, the output_name contains a : character, which is an allowed character in a filename on Linux, but not Windows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文