xDebug 不显示 HTML 输出 (Mac OSX Lion)

发布于 2024-12-20 08:58:08 字数 1198 浏览 2 评论 0原文

我刚刚安装了 xDebug,它似乎可以工作,但我只是在页面上获得纯文本输出。 我怎样才能得到 xDebug 的 html 输出,就像它应该的那样?

我的 php.ini 已打开 html_erros,我的机器是 Mac osx lion。

zendServer;

Zend Data Cache | Off
Zend Debugger   | Off

php.ini 行;

; html_errors
;  Default Value: On
;  Development Value: On
;  Production value: On

; zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.show_local_vars=On
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20

Phpinfo() 不正确;

    This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Java Bridge v3.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]

问候, 尼基

I just installed xDebug, It seems to work but I just get plain text output on my pages.
How can I get the html output of xDebug like it should be?

My php.ini has html_erros ON, my machine is Mac osx lion.

zendServer;

Zend Data Cache | Off
Zend Debugger   | Off

php.ini lines;

; html_errors
;  Default Value: On
;  Development Value: On
;  Production value: On

; zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.show_local_vars=On
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20

Phpinfo() not correct;

    This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Java Bridge v3.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]

Regards,
Nicky

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

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

发布评论

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

评论(2

旧城烟雨 2024-12-27 08:58:08

来自他们的网站。

xdebug.remote_autostart
类型:布尔值,默认值:0
通常,您需要使用特定的 HTTP GET/POST 变量来启动远程调试(请参阅远程调试)。当此设置设置为 1 时,Xdebug 将始终尝试启动远程调试会话并尝试连接到客户端,即使 GET/POST/COOKIE 变量不存在。

另外,请确保您禁用 Zend 调试器。事实上,我记得不太清楚,但您可能必须禁用其他 Zend 功能,例如 Zend Optimizer。

要禁用 Zend 调试器:

  1. 打开 Zend Server 控制面板 -> http://localhost:10081
  2. 禁用 Zend 调试器

或者,您也可以手动执行此操作:

  1. $ cd /usr /local/zend/etc/conf.d
  2. $ vim debugger.ini
  3. 在此行前添加分号
    • zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
    • 然后变成
    • <代码>; zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger

From their website.

xdebug.remote_autostart
Type: boolean, Default value: 0
Normally you need to use a specific HTTP GET/POST variable to start remote debugging (see Remote Debugging). When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.

Also, make sure you disable Zend Debugger. In fact, I don't remember perfectly but you might have to disable other Zend stuff like Zend Optimizer.

To disable the Zend Debugger:

  1. Open the Zend Server Control Panel -> http://localhost:10081
  2. Disable Zend Debugger

Or, optionally, you could do this manually:

  1. $ cd /usr/local/zend/etc/conf.d
  2. $ vim debugger.ini
  3. Add a semi-colon before this line
    • zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
    • which then becomes
    • ; zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
挽梦忆笙歌 2024-12-27 08:58:08

已解决。 php.ini 中有两个不同的部分,我必须在其中打开 html_errors。不太好,我必须更好地检查 phpinfo() 才能看到,在仅打开一个 html_error 部分后,html_errors 仍然“关闭”!

Resolved. There were 2 different sections in the php.ini where I had to turn html_errors on. No very good, I had to check the phpinfo() beter to see, html_errors where still 'off' after turn just one html_error section on!

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