如何做 Eclipse + Zend (Magento) 在本地机器上调试?

发布于 2024-09-28 19:31:55 字数 995 浏览 0 评论 0原文

我试图弄清楚如何使用 Eclipse 对 Zend(更具体地说是 Magento)代码进行调试。

这是我想要的工作流程:

  1. 在 Eclipse 中设置断点。
  2. 打开 Firefox 或 Chrome,在浏览器中打开站点
  3. 当代码到达断点时,Eclipse 会停止执行,让我查看跟踪所有内容。

现在,我使用 Eclipse 中的 Debug As 来调试应用程序,一切都很好,但我不想使用 Eclipse 中的浏览器,我希望能够使用桌面上的任何浏览器。

这是我的设置:

Ubuntu 10.04.1

/etc/php5/apache2/php.ini:uid

zend_extension=/usr/lib/php5/20090626+lfs/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1/32,127.0.1.1/32,192.168.15.233
zend_debugger.expose_remotely=always
zend_debugger.httpd_uid="33"

33 是​​ www-data。

在浏览器中拉出一个只有 phpinfo() 的 PHP 测试文件:

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies

我想我确实注意到,当我在命令行执行“php -m”时,[Zend Modules] 下没有列出任何内容。

我想我在 Firefox 中提取的进程与 Eclipse 调试连接到的进程不同。我怎样才能让他们互相交谈?

我想在不安装 Zend studio 或 Zend 服务器的情况下执行此操作,因为公司不会支付任何费用。

I'm trying to figure out how to do debugging on Zend (more specifically Magento) code using Eclipse.

This is the workflow I'd like:

  1. Set breakpoints in Eclipse.
  2. Open up Firefox or Chrome, pull up the site in the browser
  3. When code hits the breakpoint, Eclipse halts execution, letting me look trace everything.

Right now, I debug the application using Debug As inside Eclipse, it all works great, but I don't want to use the browser in Eclipse, I want to be able to use any browser on my desktop.

Here is my setup:

Ubuntu 10.04.1

/etc/php5/apache2/php.ini:

zend_extension=/usr/lib/php5/20090626+lfs/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1/32,127.0.1.1/32,192.168.15.233
zend_debugger.expose_remotely=always
zend_debugger.httpd_uid="33"

uid 33 being www-data.

Pulling up a PHP test file in the browser which just has phpinfo() spits out:

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies

I think I do notice is when I do 'php -m' at the command line, there is nothing listed under [Zend Modules].

I guess the process that I'm pulling up in Firefox is not the same processes that Eclipse Debug is connecting to. How do I get them to talk to each other?

I would like to do this without install Zend studio or Zend servers since the company won't pay for anything.

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

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

发布评论

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

评论(1

冰之心 2024-10-05 19:31:55

您可以在 Eclipse 首选项中定义可用的 Web 浏览器(只需在首选项搜索过滤器中键入 browser)。选择“使用外部网络浏览器”,然后选择您想要的浏览器即可完成。
然后在 php > 下调试>工作台选项,您可以取消选中“打开 php 调试视图”

You can define available web browers within eclipse prefences (just type browser in the preferences search filter). Select "use external web browser", and choose the browser you want and you're done.
Then under php > debug > workbench option, you may uncheck "open php debug views"

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