【问题标题】:Waiting For Connection (netbeans-xdebug)等待连接 (netbeans-xdebug)
【发布时间】:2015-11-16 07:09:24
【问题描述】:

我使用的是 64 位的 Windows7。我的 PHP 版本是 5.6.3(使用 phpinfo(); 得到这个)。我正在尝试将 XDebugNetBeans 一起使用。我的 Netbeans 版本是 8.0.2。我的 Xdebug 部分 phpinfo();如下。

我将下面的代码放在 php.ini 文件中并重新启动了 Apache。

[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host=192.168.1.5
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

我在我的 Netbeans 代码中设置了断点。当我单击“调试项目”按钮时,我在 Netbeans 底部得到 Waiting For Connection (netbeans-xdebug)

谁能知道问题出在哪里??

【问题讨论】:

  • 尝试xdebug.remote_host=localhost,如果netbeans在IP为192.168.1.5的机器上运行,在Netbeans中将url设置为http://localhost/myproject/index.php。也在本地主机上删除xdebug.remote_connect_back=1
  • 我的评论对你有帮助吗?对我的评论有任何回应吗?
  • 对我来说,我不知道有三个位置我必须指定端口 = 9000,并且不匹配导致“等待连接(netbeans-xdebug)”:stackoverflow.com/a/41768167/470749

标签: php debugging netbeans windows-7 xdebug


【解决方案1】:

既然你已经设置好了,我假设你检查了所有常见的嫌疑人:

  • 配置
  • 远程主机
  • idkey

等等。

我容易忘记的两件事是:

  1. 为项目选择 Web Root 文件夹
  2. 确保您在 Netbeans 中的代码和服务器上的代码相同。 (只是 再次下载项目)

【讨论】:

    猜你喜欢
    • 2013-12-15
    • 2013-07-10
    • 2016-03-13
    • 2018-08-09
    • 2023-03-03
    • 1970-01-01
    • 2011-10-12
    • 2015-07-14
    相关资源
    最近更新 更多