On Eclipse go to Run -> Debug Configurations Click new configuration
Folder: Server
*Name: php-debugger (can chose another name, of course! :) )
*PHP server - default PHP Web Server
*File: /newProject/index.php
Open configure...
*Debugger: xdebug
*base url: http://localhost
*local web root: /var/www/html/newProject
*OK
*
Folder: Debugger
*Server Debuger --> XDebug
APPLY
CLOSE
go to /var/www/html and create a new folder "newProject"
Create a PHP Project in eclipse (using, of course, the folder you created)
Create new file index.php with some code to text and set a breakpoint with double click on the left side of the code
Open php.ini
sudo gedit /etc/php5/apache2/php.ini
past the code
save the file and exit
restart apache: sudo /etc/init.d/apache2 restart