【问题标题】:Can't get xdebug to work on Win 7 with xampp 1.8.1无法使用 xampp 1.8.1 让 xdebug 在 Win 7 上工作
【发布时间】:2013-07-07 14:03:06
【问题描述】:

我正在尝试使用 xampp 1.8.1 配置 Xdebug。我曾尝试将向导与 phpinfo() 结果一起使用,但它似乎不起作用。 “下载”字段为空白。在 phpinfo() 中,所有列出的扩展版本都是 VC9,看起来我需要线程安全。我已经尝试过 32 位和 64 位版本的 VC9_TS 版本,但似乎没有任何效果。我正在使用 phpinfo)() 上显示的 php.ini。我检查了 Apache 和 PHP 错误日志,但没有相关条目。

XDebug 向导:

Summary
Xdebug installed: no
Server API: Apache 2.4 Handler Apache Lounge
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.7
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\windows
Configuration File: C:\xampp\php\php.ini
Extensions directory: C:\xampp\php\ext

说明

Download
Move the downloaded file to C:\xampp\php\ext
Edit C:\xampp\php\php.ini and add the line
zend_extension = C:\xampp\php\ext\
Restart the webserver

在 php.ini 中我有以下内容:

[XDebug]
zend_extension="c:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="c:\xampp\tmp>"

提前感谢您的帮助!

【问题讨论】:

标签: php xampp xdebug


【解决方案1】:

你解决了这个问题吗?如果没有,请试试这个。 我的情况和你一样,我得到了结果

1)php.ini 文件内容

    zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
    xdebug.remote_autostart=on
    xdebug.remote_enable=on
    xdebug.remote_enable=1
    xdebug.remote_handler="dbgp"
    ;xdebug.remote_host="localhost:81"
    xdebug.remote_host=192.168.1.5
    ;xdebug.remote_connect_back=1
    xdebug.remote_port=9000
    xdebug.remote_mode=req
    xdebug.idekey="netbeans-xdebug"

这里我用的是最新的dll,不过需要测试其他改动后才可以改。

xdebug.remote_host=192.168.1.5 - 这是我系统的 IPv4 地址,我改成这个是因为我无法使用 localhost 和 127.0.0.1 进行调试。

在 NetBeans IDE 中,打开工具-> 选项->PHP->调试。 debugger port 和 Session Id 的值应该与 php.ini 中指定的 port 和 idekey 匹配

现在保存 php.ini,重新启动 Apache 并尝试调试

谢谢 约翰逊

【讨论】:

    猜你喜欢
    • 2019-05-20
    • 1970-01-01
    • 1970-01-01
    • 2012-04-28
    • 2010-12-26
    • 2023-03-24
    • 2019-09-03
    • 2011-04-21
    • 1970-01-01
    相关资源
    最近更新 更多