Xdebug + XAMPP + Netbeans =失败.无法使调试器在Netbeans中工作 [英] Xdebug + XAMPP + Netbeans = fail. Cannot get debugger to work in Netbeans

查看:218
本文介绍了Xdebug + XAMPP + Netbeans =失败.无法使调试器在Netbeans中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了有关此主题的其他问题.列出的解决方案无效.

I've read other questions regarding this topic. The listed solutions haven't worked.

已安装:

XAMPP 1.7.7

XAMPP 1.7.7

Netbeans 7.1.1

Netbeans 7.1.1

XDebug 2.1.4

XDebug 2.1.4

phpinfo()显示Xdebug已安装了所有正确的参数:

phpinfo() shows that Xdebug is installed with all the correct parameters:

zend_extension = C:\ xampp \ php \ ext \ php_xdebug-2.1.4-5.3-vc9.dll

zend_extension = C:\xampp\php\ext\php_xdebug-2.1.4-5.3-vc9.dll

xdebug.remote_enable =

xdebug.remote_enable = on

xdebug.remote_handler ="dbgp"

xdebug.remote_handler = "dbgp"

xdebug.remote_host =本地主机"

xdebug.remote_host = "localhost"

xdebug.remote_port = 9000

xdebug.remote_port = 9000

但是,当我启动Netbeans调试会话时,它会循环一段时间而没有任何效果.当我停止它时,我收到信息"框,通知我在 nn 秒内未检测到来自xdebug的连接.原因可能是未安装 xdebug或未正确配置." /strong>(重点).

However, when I start a Netbeans debug session, it cycles for awhile with no effect. When I stop it, I get the Info box informing me that "No connection from xdebug was detected with in nn seconds. The reasons could be that xdebug is not installed or not properly configured. (their emphasis).

据我所知,我正确配置了所有内容,重新启动了Apache服务器,但仍然无法正常工作.我对如何进行一无所知.感谢您的帮助.

As far as I can tell, I configured everything correctly, restarted the Apache server and it still doesn't work. I'm at a total loss on how to proceed. Any help is appreciated.

推荐答案

您相信吗!经过数小时的研究,我终于找到了只能归类为错误的原因.现在,如何报告错误?那是下一个问题.

Can you believe it!? After spending literally HOURS researching this problem, I finally found the cause which I can only classify as a bug. Now, how do I report a bug? That's the next question.

以下是摘要:

创建PHP项目并将NetBeans项目站点根目录设置为子文件夹. (为了不为我的任何新任务注册Apache新测试站点 将每个新任务放到我本地测试域下的子文件夹中,例如 http://test.my/project3/). NetBeans将不会启动调试会话 在这种情况下会自动.您会看到等待连接" 下图显示消息.不用担心.保持原样.去 您的浏览器.我使用FireFox4.然后调用您要调试的脚本 带有附加参数,例如 http://test.my/project3/index.php?XDEBUG_SESSION_START=netbeans-xdebug

create PHP project and setup NetBeans project site root to subfolder. (In order to not register for Apache new test site for any new task I put every new task into subfolder under my local test domain, e.g. http://test.my/project3/ ). NetBeans will not start debugging session automatically in this case. You will see a ‘waiting for connection’ message from the image below. Do not worry. Left it as it is. Go to your browser. I use FireFox 4. And call the script you wish to debug with additional parameter, e.g. http://test.my/project3/index.php?XDEBUG_SESSION_START=netbeans-xdebug

当您返回NetBeans时,您将看到与xdebug的连接 建立成功.要停止XDebug会话,请手动调用任何 具有该参数的同一子目录中的脚本 ?XDEBUG_SESSION_STOP_NO_EXEC = netbeans-xdebug

When you return to NetBeans you will see that connection with xdebug is established successfully. To stop XDebug session manually call any script from the same subdirectory with this parameter ?XDEBUG_SESSION_STOP_NO_EXEC=netbeans-xdebug

完整的解决方案可以在我最新的英雄博客中找到用于PHP的NetBeans 7.0等待连接到XDebug

The complete solution can be found on my newest hero's blog NetBeans 7.0 for PHP Waiting for Connection to XDebug

知道我刚刚发现了什么吗?我删除了index.php作为运行配置的索引文件.就像超级按钮一样工作,而无需手动插入网址的xdebug部分.

Know what I just discovered? I removed index.php as the index file of my run configuration. Works like a charm without having to manually insert the xdebug section of the url.

这篇关于Xdebug + XAMPP + Netbeans =失败.无法使调试器在Netbeans中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆