在 OS X 上使用 Aptana Studio 和 Xdebug 或 Zend 调试器进行 PHP 调试 [英] Php debugging with Aptana Studio and Xdebug or Zend debugger on OS X

查看:20
本文介绍了在 OS X 上使用 Aptana Studio 和 Xdebug 或 Zend 调试器进行 PHP 调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否设法让 Aptana Studio 调试工作?我尝试按照此操作,但我没有看到 Windows ->首选项 ->Aptana ->编辑器->PHP ->PHP Interpreters 在我的菜单中(我已经安装了 PHP 插件),当我尝试调试时,任何设置服务器菜单的尝试都会给我套接字错误".Xdebug已安装,通过php info确认.

Have you managed to get Aptana Studio debugging to work? I tried following this, but I don't see Windows -> Preferences -> Aptana -> Editors -> PHP -> PHP Interpreters in my menu (I have PHP plugin installed) and any attempt to set up the servers menu gives me "socket error" when I try to debug. Xdebug is installed, confirmed through php info.

推荐答案

我已经将 ZendDebugger 与 Eclipse(在 OS X 上)结合使用一段时间了,效果很好!

I've been using ZendDebugger with Eclipse (on OS X) for a while now and it works great!

这是对我很有效的食谱.

Here's the recipe that's worked well for me.

  1. 通过一体化"软件包安装 Eclipse PDT:http://www.zend.com/en/community/pdt
  2. 安装 ZendDebugger.so (http://www.zend.com/en/community/pdt)
  3. 使用 ZendDebugger 扩展配置您的 php.ini(信息如下)

配置 ZendDebugger:

Configuring ZendDebugger:

  1. 编辑php.ini
  2. 添加以下内容:

  1. edit php.ini
  2. add the following:

[Zend]
zend_extension=/full/path/to/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=总是
zend_debugger.connector_port=10013

[Zend]
zend_extension=/full/path/to/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
zend_debugger.connector_port=10013

现在在命令行中运行php -m"以输出所有已安装的模块.如果您看到以下内容,则它安装得很好

Now run "php -m" in the command line to output all the installed modules. If you see the following then its installed just fine

[Zend Modules]  
Zend Debugger

现在重新启动 Apache,以便它使用 ZendDebugger 重新加载 PHP.在其中创建一个虚拟页面并检查输出以确保 PHP apache 模块也选择了 ZendDebugger.如果设置正确,您将在 phpinfo() 的输出中的某处看到类似于以下文本的内容.

Now restart Apache so that it reloads PHP w/ the ZendDebugger. Create a dummy page with in it and examine the output to make sure the PHP apache module picked up ZendDebugger as well. If it's setup right you will see something like the following text somewhere in phpinfo()'s output.

使用 Zend Debugger v5.2.14,版权所有 (c) 1999-2008,由 Zend Technologies 提供

with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by Zend Technologies

好的 - 但您想要 Aptana Studio...此时我将 Aptana Studio 插件安装到 Eclipse 的 PDT 版本中.相关说明位于:http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration

OK - but you wanted Aptana Studio... at this point I install the Aptana Studio Plugin into the PDT build of Eclipse. The instructions for that are at: http://www.aptana.com/docs/index.php/Plugging_Aptana_into_an_existing_Eclipse_configuration

这个设置对我很有帮助 - 希望它也能帮到你

That setup has served me well for a while - hopefully it helps you too

-阿林

这篇关于在 OS X 上使用 Aptana Studio 和 Xdebug 或 Zend 调试器进行 PHP 调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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