xdebug、Netbeans 和 MAMP - 等待连接(永远)

发布于 2024-11-25 21:41:42 字数 919 浏览 5 评论 0原文

简而言之,这是我的设置:MAMP,项目位于 Codeigniter 框架中,只需设置 xdebug 和 Netbeans。我还有 Chrome 的 xdebug 帮助扩展。

问题是,当我尝试在 Netbeans 中运行调试时,“等待连接 (netbeans-xdebug)”出现并且永远不会消失。我无法执行任何调试操作。

xdebug 似乎已经正确安装,正如它出现在 phpinfo 中一样,并且设置看起来正确 - 除了一件让我觉得奇怪的事情。 idekey 的主值是它应该的值(netbeans-xdebug),但本地值不同(它实际上是我的系统帐户的用户名)。这个本地值重要吗?我将如何改变它?

另外,根据使用 xdebug 帮助程序扩展的建议,我在项目属性高级选项中选择了“不打开 Web 浏览器”。 “高级 Web 配置”对话框上有一个小警告,提示“可能需要项目映射”,但到目前为止,该对话框中尚未填写任何内容。此外,在该对话框中,调试器代理主机为空,端口 9001,不确定这是否相关。

我的 php.ini 的相关部分如下:

[xdebug]
xdebug.default_enable=1
zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"

我正在使用的 xdebug.so 文件是从最新的 komodo 下载中复制并粘贴的。

非常非常感谢您提供的任何帮助 - 这是一个非常令人沮丧的帮助!

So here's my setup in a nutshell: MAMP, project is in Codeigniter framework, just set up xdebug and Netbeans. I also have the xdebug helper extension for Chrome.

The problem is that when I try to run debug in Netbeans, "Waiting for connection (netbeans-xdebug)" appears and never goes away. I'm unable to perform any debug actions.

xdebug appears to have installed correctly, as it appears in phpinfo and the settings appear correct - except for one thing that strikes me as strange. The master value of the idekey is what it should be (netbeans-xdebug) but the local value is different (it's actually the username of my system account). Does this local value matter and how would I go about changing it?

Also, following advice for using the xdebug helper extension, I selected "do not open web browser" in the project properties advanced options. There's a little alert on that "advanced web configuration" dialog saying "project mapping might be needed" but as of now nothing is filled out there. Also on that dialog, debugger proxy host is blank with port 9001, not sure if that's at all relevant.

The relevant section of my php.ini is as follows:

[xdebug]
xdebug.default_enable=1
zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"

The xdebug.so file I'm using is copied and pasted from the latest komodo download.

Many, many thanks in advance for any help - this is a very frustrating one!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拿命拼未来 2024-12-02 21:41:42

老兄,我正在使用 netbeans+wamp+vista+chrome+drupal,但我有一个奇怪的行为。第一次运行 netbeans 进行调试时,我无法设置任何断点。注意不要勾选“停在第一行”选项。因此,我设置了一些断点,然后就可以开始调试了。这很奇怪,但我只能从第二次开始调试!

Dude, i'm using netbeans+wamp+vista+chrome+drupal and i've had a strange behavior. The first time i run netbeans to debug i can't have any breakpoints. Pay attention to uncheck the option "stop in the first line". So, i put some breakpoints and i was able to start debugging. It is strange but i'm only able to debug from the second time!

小霸王臭丫头 2024-12-02 21:41:42

我的 php.ini 中没有 xdebug.remote_autostart=1 行,也没有启用“不打开 Web 浏览器”选项。当我尝试按照你的方式做时,出了问题。

当我使用 xdebug 时,我按下 Netbeans 中的调试按钮,它会将我重定向到浏览器,并将 cookie 附加到 url(来自项目的运行配置),如下所示:

http://yoururl.org/index.php?XDEBUG_SESSION_START=netbeans-xdebug

我会先尝试让它像这样工作,然后再担心关于让它始终打开的更高级选项。

I don't have the xdebug.remote_autostart=1 line in php.ini, and I don't have the 'do not open web browser' option enabled. It went wrong when I tried to do it your way.

When I use xdebug, I press the debug button in Netbeans and it redirects me to the browser with a cookie appended to the url (from the project's run configuration) like this:

http://yoururl.org/index.php?XDEBUG_SESSION_START=netbeans-xdebug

I'd try getting it to work like that first, then worry about the more advanced option of having it always on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文