在 OS X 上使用 Aptana Studio 和 Xdebug 或 Zend 调试器进行 PHP 调试
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/127761/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Php debugging with Aptana Studio and Xdebug or Zend debugger on OS X
提问by deadprogrammer
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 Interpretersin my menu (I have PHP plugininstalled) and any attempt to set up the servers menu gives me "socket error" when I try to debug. Xdebugis installed, confirmed through php info.
您是否设法让 Aptana Studio 调试工作?我尝试遵循此操作,但Windows -> Preferences -> Aptana -> Editors -> PHP -> PHP Interpreters在我的菜单中没有看到(我已PHP plugin安装),并且当我尝试调试时,任何设置服务器菜单的尝试都会给我“套接字错误”。Xdebug已安装,通过php info.
采纳答案by phatduckk
I've been using ZendDebugger with Eclipse (on OS X) for a while now and it works great!
我已经将 ZendDebugger 与 Eclipse(在 OS X 上)一起使用了一段时间,而且效果很好!
Here's the recipe that's worked well for me.
这是对我很有效的食谱。
- install Eclipse PDT via "All in one" package at: http://www.zend.com/en/community/pdt
- install ZendDebugger.so (http://www.zend.com/en/community/pdt)
- configure your php.ini w/ the ZendDebugger extenssion (info below)
- 通过“多合一”软件包安装 Eclipse PDT:http: //www.zend.com/en/community/pdt
- 安装 ZendDebugger.so ( http://www.zend.com/en/community/pdt)
- 使用 ZendDebugger 扩展配置你的 php.ini(信息如下)
Configuring ZendDebugger:
配置 ZendDebugger:
- edit php.ini
add the following:
[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.ini
添加以下内容:
[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
Now run "php -m" in the command line to output all the installed modules. If you see the following then its installed just fine
现在在命令行中运行“php -m”以输出所有已安装的模块。如果您看到以下内容,则它安装得很好
[Zend Modules]
Zend Debugger
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.
现在重新启动 Apache,以便它使用 ZendDebugger 重新加载 PHP。在其中创建一个虚拟页面并检查输出以确保 PHP apache 模块也选择了 ZendDebugger。如果设置正确,您将在 phpinfo() 的输出中的某处看到类似于以下文本的内容。
with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by Zend Technologies
使用 Zend Debugger v5.2.14,版权所有 (c) 1999-2008,由 Zend Technologies
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
好的 - 但您想要 Aptana Studio...此时我将 Aptana Studio 插件安装到 Eclipse 的 PDT 版本中。相关说明位于: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
这种设置对我很有帮助 - 希望它也能帮助你
-Arin
-阿林
回答by Devon
回答by Andy Braham
I realize that this is a old thread but I was having the same problem with Aptana Studio 3 and FireFox. If anyone is having this problem make sure that FireFox has FireBug V1.8.Xinstalled, any other version might give you the same problem...
我意识到这是一个旧线程,但我在使用 Aptana Studio 3 和 FireFox 时遇到了同样的问题。如果有人遇到此问题,请确保 FireFox安装了FireBug V1.8.X,任何其他版本都可能给您同样的问题...
Hope this helps
希望这可以帮助

