3

I have xampp with wordpress inside it. I have also downloaded the eclipse plugin for PHP from http://download.eclipse.org/tools/pdt/updates/3.0/milestones/ .I want to create a project in eclipse (Indigo 3.7) and debug my PHP code. Is there a way to do it ?

I have tried load of things. Finally, i decided i will go ahead with XDebug. I configured XDebug in PHP by modifying php.ini file and saw that it had been configured by viewing phpinfo().

I have configured eclipse indigo to use XDebug as my php debugger but nothing is happening.

Steps I followed :

1) Created a PHP project in eclipse from existing location For e.g. my project is in E:\others\xampp-win32-1.7.7-VC9\xampp\htdocs

2) Modified php.ini file to support xdebug and verified from phpinfo() method.

3) Configured eclipse to use XDebug as the PHP debugger.

Following is how the PHP debug looks like: enter image description here

Secondly, comes the PHP executable: enter image description here

Next, is what i think is something going wrong ! Configuring the PHP server. I read that we need to specify the path mapping and stuff. I didn't get exactly how to do that. enter image description here

and the path mapping for the server enter image description here

Just to add when i try to debug the index.php file as debug as PHP script : it keeps on launching with the message Launching : Launching delegate (24%) and never completed execution.

Can anyone suggest what is missing or needs to be corrected ?

PHP.ini file modification for XDebug

[XDebug] zend_extension = "E:\others\xampp-win32-1.7.7-VC9\xampp\php\ext\php_xdebug.dll" xdebug.remote_enable=1 xdebug.remote_host="127.0.0.1" xdebug.remote_port=9000 xdebug.remote_handler="dbgp" xdebug.remote_mode="req"

Thanks, Adithya.

Adithya
  • 2,923
  • 5
  • 33
  • 47

1 Answers1

0

Just set your workspace to the xampp working folder (htdocs).

You can create new projects in eclipse and see the results by opening http://localhost/YOURPROJECTNAME in your webbrowser (error_reporting defaults to ON in xampp, so you will see errors).

Benedikt Wölk
  • 311
  • 1
  • 5
  • How do i debug the code ? Lets say i run a php file from my wordpress blog (which is inside wordpress) then how i debug the flow ? – Adithya Nov 17 '11 at 14:39
  • Well, I stopped using eclipse in favor of [Aptana Studio](http://aptana.com/), which does a better job for PHP development IMHO. In eclipse you should be able to use Debug As > PHP-Script. Here is a [full guide](http://www.eclipse.org/pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf) – Benedikt Wölk Nov 17 '11 at 15:09
  • I am not able to debug yet using Eclipse 3.7. I have updated my steps in my question. Dunno what i am missing ! I followed the steps in teh guide you mentioned but didn't work. I have configured my php.ini file correctly as it shows XDebug enabled in phpinfo() method. Probably some problem with eclipse configuration. – Adithya Nov 18 '11 at 11:44