Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XDebug with Aptana Studio 3

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.

like image 217
OTN Avatar asked Jul 28 '11 14:07

OTN


2 Answers

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:

XDebug

b.) If you didn't overwrite the index.php create a file (/www_dir/phpinfo.php) with the following:
<?php
phpinfo();
?>

b.1) In FireFox enter "localhost/phpinfo.php" and look for XDebug as shown in the previous image.

Aptana Studio:

  1.) Click Window->Preferences
  2.) In the Preferences dialog go to Aptana Studio->Editors->PHP->PHP Interpreters
  3.) Click "Add..."
  4.) Enter the information like 

this

  5.) Click "OK"
  6.) Click on the debug icon and select "Debug Configurations"
  7.) Double click on "PHP Web Page"
  8.) Click the plus next to "PHP Server"

     a.) Enter a name
     b.) Base URL will be "localhost"
     c.) Document Root will be the path to your index.php

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

like image 97
Andy Braham Avatar answered Nov 11 '22 00:11

Andy Braham


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 :)

like image 25
sgibly Avatar answered Nov 11 '22 00:11

sgibly