Setup pdt and the xDebug debugger

Use the following steps to setup pdt. All images can be enlarged by clicking on it.

Start eclipse and select a place to put your workspace. This is not the place of the webroot. Just leave it to default and press OK.

Open the workbench by clicking on the appropiate icon.

Open the php perspective by clicking on the small icon with plus sign in the top right of the window and selecting PHP.

Right click in the PHP exlorer on the left and choose New -> PHP Project

Give the project a name
Uncheck the project contents 'Use default'
Enter /var/www/typo3 in the directory field
Press Finish

Choose 'Create project in /var/www/typo3. Take note of the warning that if you delete the project from pdt, the contents of /var/www/typo3 may be deleted. So be carefull deleting the project.

If all goes well, the directory structure of typo3 shows up in the PHP Explorer. If you double click on index.php, it will be opened in the editor.

Choose Window -> Preferences... to open the preferences dialog. Open PHP and select PHP executables. Press Add to add a new executable. Give the executable a name and select /usr/bin/php5 as executable path. Make sure that you select xDebug as PHP Debugger. Press Finish to close the window. And press OK to close the preferences window.

Make sure that pdt uses an external browser by selecting Window -> Web Browser -> Default system Web browser

Double click on the side of the php editor to set a breakpoint

Choose Run -> Open Debug Dialog...

Right click on PHP Web Page and choose New
Fill in these values:
Server Debugger: xDebug
File: /index.php
Url, Auto generate: uncheck
Url, Url: localhost/index.php

Choose Debug

If all goes well, a browser will open on index.php and the debugger will stop at your breakpoint.