views:

300

answers:

3

I want to use PDT to debug PHP with eclipse. I am using ubuntu 9.04. Can any one help me? please give details if possible.

+2  A: 

Considering this thread and this one:

You have to ensure that xdebug is definitely loaded on the version of php you are using.
To do this, use the launch configuration you are using to try to run your script in debug mode and change it to run a script with phpinfo.php in it.
Also a Debug log would be good.

Add:

 xdebug.remote_autostart=On
 xdebug.remote_log="c:\temp\xdebug.log"

to your php.ini.

Then you have to insure that PDT is expecting Xdebug information on port 9000, and have insured that your local Default PHP Web Server is http://127.0.0.1.

With the log, you might discover, for instance, that your php.ini files is not properly formatted, which could be enough to prevent you debugging PHP from PDT.

VonC
A: 

UYu would have to install PHP5 xdebug extension first,

sudo aptitude install php5-xdebug

after you would have to check your settings by editing /etc/php5/conf.d/xdebug

after you have to setup your php project to use xdebug and you should be done.

RageZ
A: 

I'm use PDT in Ubuntu 9.04 and can fine debug my php projects. first as already answered install php5-xdebug through apt-get or synaptic (I'm think you already install php5 itself in same way :) ). Then you must define php executables in Window/Preferenses/PHP/PHP Executables. You can point to /usr/bin/php, or can use 'Search...' button, but you must point initial search dir to nearest to your php exec binary. After found executable it always set to use Zend Debug by default. Edit executable to change 'PHP debugger' type to XDebug. And now a main trick. When you try debug your php scripts without create run configuration - it will always use Zend Debugger. You must create your own run configuration with XDebug setted as PHP Debugger. It's worked for me.

Alexey Sviridov