Php debugging with Aptana Studio and Xdebug or Zend debugger on OS X

23,862

Solution 1

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. install Eclipse PDT via "All in one" package at: http://www.zend.com/en/community/pdt
  2. install ZendDebugger.so (http://www.zend.com/en/community/pdt)
  3. configure your php.ini w/ the ZendDebugger extenssion (info below)

Configuring ZendDebugger:

  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=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

[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.

with Zend Debugger v5.2.14, Copyright (c) 1999-2008, by 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

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

-Arin

Solution 2

This is not related to Aptana Studio, but if you are looking for a PHP XDebug debugger client on OS X, you can try MacGDBp (Free/GPL).

Share:
23,862
deadprogrammer
Author by

deadprogrammer

Web developer, blogger, content management specialist. Major switches in life: Soviet Union to the US, single to married, PC to Mac, ASP to PHP, Sharepoint to Drupal. My blog is actually readable, people tell me. Go check it out at http://www.deadprogrammer.com

Updated on June 06, 2020

Comments

  • deadprogrammer
    deadprogrammer almost 4 years

    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.

  • Enrique San Martín
    Enrique San Martín almost 13 years
    > 1. ... > 2. install ZendDebugger.so (zend.com/en/community/pdt) How is installed ZendDebugger.so? i can't find it in the link... :P Regards :)