Notes
This documentation uses variables denoted with a $ followed by a keyword, all this emphasized with red text (i.e. $variable). These variables should be replaced with appropriate values. Suggested default values are denoted with a variable followed by an equal sign and a value (i.e $variable = value).
Requirements
Create a New PHP Server
- Open Eclipse
- Create a new PHP Server
- Select the Window > Preferences menu option
- Select the PHP > PHP Servers left menu option
- Click the New button
- Set the following fields
Name: $domain
URL: http://$domain
- Click the Finish button
- Click the OK button
Create a new Debug Configuration
- Open Eclipse
- Select the Run > Debug Configurations… menu option
- Double click the PHP Web Page option
- Set the following fields
Name: $domain
PHP Server: $domain
File: Browse to the file belonging to this domain that you wish to debug
Breakpoint > Break at First Line: Uncheck this if you do not wish to break at the first line in the file
URL > Auto Generate: Uncheck if necessary (ending / in first checkbox and beggining / in second checkbox is OK)
- Click the Apply button
- Click the Close button
Debug a Configuration
- Open Eclipse
- Open a file associated with a Debug Configuration in the PHP Perspective
- Set a breakpoint on a line in the file by double clicking to the left of that line
- Select the Window > Open Perspective > PHP Debug menu option
- Select the Run > Debug Configurations… menu option
- Select the Debug Configuration you would like to debug
- Click the Debug button
Your browser will automatically open to the url in debug mode. Navigate back to Eclipse and you can see that processing has halted at the.