In my Past days, i was trying to figure out the setup of Eclipse PDT with X-Debug and XAMPP for debugging a PHP Application..From my friends help,at last i configured it properly and make it up and running.
Here are the steps for the setting up the configuration.
Download the Eclipse PDT.
Download the XAMPP 1.7.2 .
Install the Eclipse and XAMPP and Check that Eclipse and XAMPP Server is up and running.
To make sure the XAMPP Server is running.Open your web browser and type in the URL(“http://localhost” without quotes). And you should see the XAMPP Start up Page.
Now stop the XAMPP Server.Navigate to the XAMPP installation directory. And you will find the ‘htdocs’.Create a PHP File inside that directory.
Thats looks like this
Save the File with any name you wish to have(For example:sample.php).And then start the XAMPP Server.
Then open your browser and start typing in the URL(“http://localhost/sample.php”)
You will see all your information about the XAMPP Server.
There you will have particular information that where is your ‘php.ini’ is located.
Stop your XAMPP Server, navigate to the ‘php.ini’ file directory then open the file in notepad .
Go to last line of the ‘php.ini’ file and add the lines that shown just below
Now save the file and close it.Now Start the XAMPP Server again.
Now open your Eclipse.
Create a ‘New PHP Project’ and Create a New File in that with any name you wish to have(For Example ‘test.php’)
In that ‘test.php’ have a small php code to test it.
echo “any text you wish”;
Save the file.
Now ,we are going to configure the debugging part.
Select your project directory in eclipse and then click on ‘Window–>Preferences’
In that expand the ‘General’ tab you will see ‘Web Browser’ click on that and then select your web browser you want your output to be displayed.
Then Apply the Setting.
Navigate to the ‘PHP’ Tab and expand it on the left hand side of the ‘Preference’ window.
You will see the ‘Debug’ tab’ and click on that.
In that screen,
Leave the below thing as Default
PHP Debugger is Zend Debugger and click on Configure in that then you will have two servers that will be listed over there.Click on XDebug and select ‘configure’ you will have ‘Access remote session(JIT)’ should be ‘localhost’ . select that and click ‘OK’.
Sever is Default PHP Web Server
then below that click on ‘PHP Executable s’.Click on ‘Search’ and locate where the XAMPP Server is installed and then click ‘OK’.
After a few minute it will show you one ‘PHP Executable’ listed over there.
Select that click on ‘Edit’ .
There you will have PHP ini File (Optional)
Click on ‘Browse’ in that navigate to ‘XAMPP Server installation Directory and there you will find ‘PHP’ Directory in that select ‘php.ini’ and then click ‘OK’ and then below that you will ‘PHP Debugger’ as ‘XDebug’.
Then apply the Setting and then click ‘OK’.
And then click ‘OK’ to apply the over all setting that you have made to it.
Now fix the breakpoint in a file and ‘Debug’ the File and see the output.
Its all configured properly.
Thanks for all my friends to share their ideas to fix up this.