使用 Aptana Studio 3 进行 XDebug
我想知道如何让 XDebug 与 Aptana Studio 3 一起工作(我已经在这台机器上安装了 Aptana Studio 3 和 XAMPP)。
您知道最近有一篇文章告诉我如何做到这一点并解释了 XDebug 吗?我对 XDebug 没有经验,也没有任何知识,我查找了一些文章,但对我来说似乎都已经过时了。
I would like to know how i can get XDebug work with Aptana Studio 3 (I already have Aptana Studio 3 on this machine with XAMPP).
Do you know a recent article telling me how to do this and explains XDebug? I have no experience nor any knowledge about XDebug, i looked for articles but all seem outdated to me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我意识到这是一个旧线程,但我也很难找到如何使用 Aptana Studio 和 FireFox 调试 php,所以这里有一个快速的操作方法...
我发现的最简单的方法是安装 wamp server V2.2,这是一个非常有用的程序,因为它安装了 Apache Server、PHP 和 MySQL 等工具,一切都可以通过任务栏轻松配置。
1.) 安装 Aptana Studio V3.3.X 或更高版本在此处下载< /a>
2.) 安装 WampServer V2.2 或更高版本 下载此处(XAMMP 用户阅读底部)。
WampServer:
1.) 确保 XDebug 正在接受远程调试,单击任务栏中的 WampServer 图标,进入 PHP->PHP 设置,并确保“(XDebug): Remote debug”为检查如果没有选择它单击 WampServer 图标并“重新启动所有服务”。
2.) 验证 XDebug 是否正在运行:
a.) 如果您让 WampServer 插入index.php,在 URL 中输入“localhost”,然后在“工具”下单击“phpinfo()”并检查以确保 XDebug 正在运行,您应该在 FireFox 中看到以下内容:
Aptana Studio:
最后在 Aptana Studio 中单击调试图标箭头并选择您在上面命名的配置。如果 Firefox 提示您安装 Aptana Studio 插件...
希望这对您有所帮助...
-------------
XAMPP 用户
-------------
按照步骤操作 的目录链接
已提供,但在“首选项”对话框中转至 Aptana Studio->Editors->PHP->PHP Interpreters 中
应链接到 C:\xampp\php\php.exe 和 C:\xampp\php\php .ini 分别
***** 更新 *****
如果您使用的是 Firefox V20+ 与 Firebug V1.8+ 存在一些兼容性问题,基本上破坏了 Firefox 的上下文菜单,我找不到解决方案,所以我最终不得不走另一条路,并认为我应该发一篇文章,Aptana Studio 基于 Eclipse因此,恕我直言,获得 PHP 调试的最佳方法是使用 PDT 安装 Eclipse 并删除 Aptana Studio...上述说明将使所有内容都可以使用 XDebug
这里有一个很好的链接,介绍如何启动并运行所有内容eclipse-pdt
I realize that this is a old thread but I also had a difficult time finding out how to debug php with Aptana Studio and FireFox so here is a quick how-to to get it working...
The easiest way I found is to install wamp server V2.2, this is a very useful program as it installs Apache Server, PHP and MySQL and other tools, everything can be easily configured via the taskbar.
1.) Install Aptana Studio V3.3.X or higher Download here
2.) Install WampServer V2.2 or higher Download here (XAMMP users read bottom).
WampServer:
1.) Make sure XDebug is accepting remote debug, click on the WampServer icon in the taskbar and go to PHP->PHP Setting and make sure that "(XDebug): Remote debug" is checked if not select it click on the WampServer icon and "Restart all services".
2.) Verify that XDebug is running:
a.) If you had WampServer insert index.php enter "localhost" in the URL and under "Tools" click "phpinfo()" and check to make sure XDebug is running, you should see the following in FireFox:
Aptana Studio:
Finally in Aptana Studio click the Debug Icon Arrow and select the configuration you named above. If Firefox prompts you install the Aptana Studio plugin...
Hope this helps out...
-------------
XAMPP USERS
-------------
Follow the steps provided but your directory link in the
In the Preferences dialog go to Aptana Studio->Editors->PHP->PHP Interpreters
should link to C:\xampp\php\php.exe and C:\xampp\php\php.ini respectively
***** UPDATE *****
If you are using Firefox V20+ there are some compatibility problems with Firebug V1.8+ that basicly breaks Firefox's context menus, I could not find a fix for it so I ended up having to go another route and figured I should make a post, Aptana Studio is based on Eclipse so the best way IMHO to get PHP Debugging is to install Eclipse with PDT and remove Aptana Studio... The above instructions will work to get everything working with XDebug
Here is a nice link on how to get everything up and running eclipse-pdt
目前,Aptana Studio 3 中不支持 PHP 调试器。不过,很快就会支持。请参阅:http://jira.appcelerator.org/browse/APSTUD-769 并将您自己添加为观察者完成后收到通知。
目前,如果您确实需要调试,可以从 eclipse.org 安装 PDT。
他们还提供有关如何使用它的最新文档。有一个小的学习曲线,但它在 Aptana 中的工作原理几乎相同(一旦发布),所以你没有什么可失去的:)
At the moment, there is no PHP debugger support in Aptana Studio 3. However, there will be soon. See: http://jira.appcelerator.org/browse/APSTUD-769 and add yourself as a watcher to get informed when it's done.
For now, you can install PDT from eclipse.org if you really need to debug.
They also provide up-to-date docs on how to use it. There is a small learning curve, but it will work pretty much the same in Aptana (once it's released), so you have nothing to lose :)
以下是如何在 Aptana Studio 3.3 中配置和开始使用 XDebug 的简短说明(假设您已在系统上安装了 xdebug)。 (在 Ubuntu/Linux 中,这只是一个
sudo apt-get install php5-xdebug
)。配置调试器</
strong> 在首选项 -> Aptana Studio -> PHP -> PHP Interpreter 中点击添加...,并指定一个名称,php 可执行文件(大多数情况下为 /usr/bin/php) Linux 发行版)、php.ini(我的系统上为 /etc/php5/conf.d/20-xdebug.ini),并将 XDebug 保留在 PHP 调试器的选择字段中。
使用调试器
创建一个 php 文件并在其中放入一些代码:
保存并按“运行”->“调试方式”->“PHP 脚本”,系统会提示您切换工作空间。
通过双击行号旁边指定行断点,例如在 exit() 函数的行处。
按Resume(F8),可以看到调试当前指令指针移到了那里。
在变量选项卡中,您现在应该可以看到哪些变量具有某些值或者哪些变量尚未初始化。可以在控制台选项卡中找到输出。
再次按恢复将终止调试。
当然,这只是调试的冰山一角,但它是一个开始。
还有许多其他选项可供探索以及调试脚本的方法。
Here is a mini how-to configure and start using XDebug with Aptana Studio 3.3, assuming you have installed xdebug on your system. (In Ubuntu/Linux it's just a
sudo apt-get install php5-xdebug
).Configure the debugger
In preferences->Aptana Studio->PHP->PHP Interpreter click on Add..., and specify a name, the php executable(/usr/bin/php in most Linux distributions), the php.ini(/etc/php5/conf.d/20-xdebug.ini on my system), and leave XDebug in the select field of PHP debugger.
Using the debugger
Make a php file and put some code in it:
Save it and press Run->Debug As->PHP Script and you will be prompted to switch Workspace.
Specify a Line Breakpoint by double clicking next to a line number, for example at the line of exit() function.
Press Resume(F8) and you can see that the Debug Current Instruction Pointer moved there.
At the variables tab, you should now see which variables have some value or they are uninitialized. The output can be found at the console tab.
Pressing resume again will terminate the debug.
Of course, this is only the tip of the iceberg regarding debug, but it's a start.
There are many other options to explore and ways to debug your scripts.
我使用 Aptana Studio 3.2.2 来开发我的 Drupal 站点并使用 XDebug 来调试项目。 Aptana Studio 支持 xdebug。您需要按照一些步骤在 Aptana Studio 中启用 xdebug。
您可以在以下链接中找到详细的分步过程:
http://devcircle.blogspot.com/2013 /02/enable-xdebug-in-aptana-studio-3x.html
希望它有助于解决问题。
I have use Aptana Studio 3.2.2 to develop my Drupal site and use XDebug to debug the project. The Aptana Studio supports xdebug. You need to follow some steps to enable xdebug in Aptana Studio.
You can find a details step by step procedure in the following link:
http://devcircle.blogspot.com/2013/02/enable-xdebug-in-aptana-studio-3x.html
Hopefully it helps to solve the problem.
对我来说,只有在之后才起作用
1. 从这里执行一些操作(基本上 - 设置 XDebug 进行远程调试)
https://jira.appcelerator.org/secure/attachment/26404/ScriptPHPDebugging.pdf
2.为chrome安装“XDebug helper”,为FF安装类似的东西。
之后,我的远程会话就像在 Eclipse 中一样工作。
For me it worked only after
1. Performing stuffs from here (basically - setting-up the XDebug for remote debugging)
https://jira.appcelerator.org/secure/attachment/26404/ScriptPHPDebugging.pdf
2. installation of "XDebug helper" for chrome, and something similar for FF.
After that I have my remote sessions working just-like-they-did-in-Eclipse.