【问题标题】:Netbeans xdebug nightmareNetbeans xdebug 噩梦
【发布时间】:2012-04-19 05:03:59
【问题描述】:

我知道你在想什么,另一个 netbeans xdebug 帖子?

嗯,我已经尝试了我在其他帖子中看到的所有内容,但似乎没有任何效果。这是我的设置:

  • 操作系统:Ubuntu 9.10
  • PHP:5.2.1
  • Netbeans:6.8

下面是我的/etc/php5/apache2/php.ini

zend_extension=/usr/lib/php5/20060613/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"

我尝试过切换端口(到目前为止,我已经尝试过 9001、9002 和 9034),使用 zend_extension_ts,在配置文件中添加额外的 xdebug 参数,但似乎没有任何效果:Netbeans 仍然说它正在等待用于连接(netbeans-xdebug)

如果我查看我的 phpinfo,我确实看到了关于 xdebug 的整个部分,并且参数是正确的。

任何帮助将不胜感激!

【问题讨论】:

  • 您的日志文件中是否收到任何错误消息?见 xdebug.remote_log 设置
  • 你自己编译的PHP,使用--enable-debug吗?
  • 好的,所以我添加了一个 xdebug.remote_log,并且发生了一些奇怪的事情。我有一个使用 xdebug_call_function 来测试 xdebug 的 php 脚本。通常,当我访问脚本时,不会将任何内容写入日志。但是,当我启动 netbeans 调试器并在它说“等待连接”时访问脚本时,我确实看到 xdebug 日志中显示结果。不过,Netbeans 从未连接过……感谢您的回复!
  • 不,我没有使用 --enable-debug 编译 php。这是我执行 apt-get install php5 时得到的 php。
  • 看起来发生的事情与netbeans无关。即使只使用 php,我也无法连接到 xdebug 端口。有人以前有过吗?

标签: php netbeans xdebug netbeans6.8


【解决方案1】:

我不知道发生了什么,但我将调试端口切换到 9000 并升级到 Netbeans 6.9,它现在可以工作了。

【讨论】:

    【解决方案2】:

    添加这些行解决了我的问题(通常)

    xdebug.remote_enable = on
    
    xdebug.profiler_enable = on
    
    xdebug.profiler_enable_trigger = on
    
    xdebug.profiler_output_name = cachegrind.out.%t.%p
    
    xdebug.profiler_output_dir = "c:/wamp/tmp"
    

    【讨论】:

      【解决方案3】:

      xdebug 似乎无法在“作为脚本运行”模式下工作 在您的本地网站上尝试一下

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-12-21
        • 2020-03-14
        • 2010-11-13
        • 2010-12-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多