how can i associate/use PDT with eclipse in ubuntu?terr

偶尔善良 提交于 2019-12-23 10:13:04

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/1401902/how-can-i-associate-use-pdt-with-eclipse-in-ubuntuterr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!