【发布时间】:2015-11-16 07:09:24
【问题描述】:
我使用的是 64 位的 Windows7。我的 PHP 版本是 5.6.3(使用 phpinfo(); 得到这个)。我正在尝试将 XDebug 与 NetBeans 一起使用。我的 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