【问题标题】:Netbeans not connecting with xdebug on Wamp : "showing waiting for connection"Netbeans 未在 Wamp 上与 xdebug 连接:“显示等待连接”
【发布时间】:2012-10-23 10:48:02
【问题描述】:

以下是我在bin\php\php5.3.9\php.inibin\apache\Apache2.2.21\bin 中的配置

[xdebug]

zend_extension = "D:/wamp/php/ext/php_xdebug-2.2.1-5.2-vc9-nts.dll"
xdebug.profiler_output_dir = "D:/wamp/tmp/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable = 0
xdebug.profiler_append=0
xdebug.extended_info=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=xdebug
xdebug.remote_log="D:/wamp/tmp/xdebug/xdebug_remot.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0

当我在wamp/php/ext/\wamp\bin\php\php5.3.9\zend_ext 中拥有php_xdebug-2.2.1-5.2-vc9-nts.dll

但它仍然没有在 phpinfo() 中显示 xdebug 信息,也没有与 xdebug 连接。

它长时间显示“等待连接”

请帮助我如何进行此配置

【问题讨论】:

  • @NullPointer :我按照上面的链接进行了配置,但仍然没有连接
  • phpinfo() 对 xdebug 有什么看法?
  • @Dukeatcoding :它没有显示任何关于 xdebug 的信息
  • 用函数调用phpinfo()创建一个php文件;你会看到

标签: php netbeans xdebug


【解决方案1】:

刚刚决定发布我与 Xdebug 的成功斗争。我所做的只是对 php.ini 进行了这些更改:

zend_extension = "D:/wamp/bin/php/php5.3.13/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"

xdebug.remote_enable = 1

xdebug.idekey="netbeans-xdebug"

xdebug.profiler_enable = 1

我希望它对某人有所帮助。

【讨论】:

  • 谢谢。我遇到了同样的问题,您的回复为我解决了问题。
【解决方案2】:

对于 Wamp Server,请确保您在正确的 php.ini 中进行更改。有 2 个文件 -

  1. \wamp_server\bin\php\php5.5.12\php.ini
  2. \wamp_server\bin\apache\apache2.4.9\bin\php.ini

我正在对第一个文件进行更改。然后我通过单击 wampserver 图标 -> PHP -> php.ini 检查正在使用的 php.ini 文件(该文件的位置在 apache 目录中,而不是我假设的 php)

更改第二个文件对我有用。

编辑 php.ini 文件以包含此代码:

zend_extension=[path to xdebug .so/.dll]
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

【讨论】:

    【解决方案3】:

    要与 netbeans 连接,您需要在工具>选项>PHP>调试器设置中进行配置,并在上面的 php.ini 中进行更改:

    xdebug.idekey=xdebug
    

    xdebug.idekey="netbeans-xdebug"
    

    希望对你有帮助

    【讨论】:

    • 我在 php.ini 中添加了 xdebug.idekey=netbeans-xdebug 行,但仍然没有连接到 netbeans
    • 当您的 php 版本为 5.3 时,您的 php 5.2 的 xdebug 您是否使用 xdebug.org/wizard.php 进行自定义裁缝安装以获得正确的 dll?
    • 我使用 xdebug.org/wizard.php....但它显示的结果如下:Tailored Installation Instructions Summary Xdebug installed: no Server API: Windows: no Zend Server: no PHP Version: Zend API nr: PHP API nr: Debug Build: no Thread Safe Build: no Configuration File Path: Configuration File: /php.ini Extensions directory: Could not find any useful information.
    • 删除您正在使用的 xdebug,当重新运行向导时,它会为您提供所需的 xdebug 的下载链接,另外它会告诉您应该如何安装它。但是从您发布的内容来看,您似乎没有正确配置 wampserver,因为它甚至没有提及您使用的 php 版本。 apache使用的php.ini文件应该在apache目录下。
    猜你喜欢
    • 2013-07-10
    • 2015-07-14
    • 2015-11-16
    • 2013-12-15
    • 1970-01-01
    • 2016-03-13
    • 2018-08-09
    • 1970-01-01
    相关资源
    最近更新 更多