【问题标题】:xdebug in xampp doesn't work on netbeansxampp 中的 xdebug 在 netbeans 上不起作用
【发布时间】:2011-09-03 03:48:27
【问题描述】:

我尝试配置 xdebug,但我使用时不起作用:

XAMPP 1.7.4  , Netbeans 7.0
Xdebug installed: 2.1.0rc1 
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC6 - Architecture: x86 
Zend Server: no 
PHP Version: 5.3.5 
Zend API nr: 220090626 
PHP API nr: 20090626 
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 

还有php.ini

zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.collect_includes = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.default_enable = 1
xdebug.extended_info = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "DBGp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000

现在的问题:

菜单附加调试器仍然被禁用或灰显。

当我尝试调试时,断点永远不会命中。脚本运行正常。

以下是我点击Debug main project时得到的网址:

http://localhost/index.php?XDEBUG_SESSION_START=netbeans-xdebug

当我关闭浏览器时,调试器不会停止。它显示waiting for connection 状态。

当我单击 NetBeans 中的停止调试按钮时,会出现一个消息框There is no connection from xdebug detected with in some seconds xdebug 未配置或未安装 xdebug。

请指导我解决上述问题并调试项目。

【问题讨论】:

    标签: netbeans xampp xdebug


    【解决方案1】:

    首先你能在http://localhost/xampp/index.php 中看到xdebug 吗?如果不是,那么您可能没有编辑正确的 php.ini 文件?似乎 XAMPP 正在使用 php.ini 文件:

    c:\xampp\apache\bin\php.ini
    

    在该文件中输入您的 xdebug 配置,重新启动 Apache,您应该能够连接。

    我无需更改 Netbeans 中的任何内容即可使其正常工作。

    截图在这里:http://rudyegenias.wordpress.com/2011/07/03/xampp-xdebug-xdebug-not-showing-in-phpinfo/

    【讨论】:

      【解决方案2】:

      ?在 Netbeans 和 XAMPP 上使用 XDebug

      • 使用http://xdebug.org/wizard.php检查您的系统并下载最佳xdebug.dll

      • 将该 .dll 放在 C:/xampp/php/ext 中

      • 编辑 C:/xampp/php/php.ini 添加以下内容

      [XDebug] zend_extension = C:\xampp\php\ext\php_xdebug-2.2.3-5.5-vc11.dll xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.show_local_vars=on xdebug.output_buffering=off

      • 重启 Apache 网络服务器

      我在很多其他设置方面都遇到了困难,但这是最好的工作

      【讨论】:

        猜你喜欢
        • 2015-09-08
        • 2017-03-05
        • 2011-12-09
        • 2012-04-28
        • 2013-08-02
        • 1970-01-01
        • 2016-03-13
        • 2014-06-11
        • 2020-11-21
        相关资源
        最近更新 更多