douxian4888 2017-09-14 19:55 采纳率: 0%
浏览 160
已采纳

netbeans xdebug等待连接,尽管通过所有论坛的答案

I get the message "waiting for connection (netbeans-xdebug)" when using netbeans debugger.

I am using: Windows 10 XAMPP for Windows 5.6.20 XAMPP control panel v3.2.2 NetBeans IDE 8.0.2

I have been round and round the forum answers for days trying everything but have drawn a blank.

The code in php.ini is :

> [XDebug]
; Only Zend OR (!) XDebug
zend_extension = c:\xampp\php\ext\php_xdebug-2.5.4-5.6-vc11.dll
xdebug.remote_autostart=on
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="c:\xampp\tmp"
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

I have tried every combination of parameters for the above imaginable.

The port I have used in netbeans is: project properties > Run Configuration > Advanced: 9001 Netbeans > Tools > Options > PHP > Debugging : 9001

Could it be significant that the debugger is using the Chrome browser, but my phpmyAdmin and the home screen for XAMPP are on IE?

  • 写回答

3条回答 默认 最新

  • douhuiqi3855 2017-09-15 07:52
    关注

    I'm not sure about Windows, but in later versions of PHP on linux (starting from at least 5.4) the xdebug configuration is in a separate file. Mine is in:

    /etc/php/7.0/apache2/conf.d/20-xdebug.ini
    

    If you don't have a dedicated xdebug ini file, make sure you are editing the right php.ini. In my system there are 3:

    /etc/php/7.0/apache2/php.ini
    /etc/php/7.0/cli/php.ini
    /etc/php/7.0/phpdbg/php.ini
    

    Here is my xdebug configuration:

    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_mode=req
    xdebug.remote_port=9000
    xdebug.show_local_vars=on
    

    A few considerations:

    1. I see your port is different from mine (9000 vs 9001). Go to Tools->Options->PHP, at the "Debugging" tab make sure the "Debugger port" corresponds to the one specified in xdebug.remote_port.

    2. Try to use localhost instead of 127.0.0.1

    3. Make sure the output of phpinfo() contains information about xdebug. If you don't have an "xdebug" section you probably need to check the zend_extension path.

    4. I remember reading on the NetBeans mailing list that a few people had problems caused by the Windows firewall, maybe you can try to disable it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站