Locally Debugging a PHP Script
This procedure describes how to debug a PHP Script from your workspace
using an internal debugger.
PDT supports both the Zend Debugger and XDebug.
|
|

|
To locally debug a PHP Script:
Set breakpoints at the relevant
places in the file that you would like to debug by double-clicking the
vertical marker bar to the left of the editor.
Save the file.
Click the arrow next to
the debug button on the toolbar and select Open Debug Dialog -or- select
Run | Open Debug Dialog.
A Debug dialog will open.
Double-click the PHP Script
option to create a new debug configuration.

Enter a name for the new
configuration.
Select the
required PHP executable.
If no PHP Executables are listed, click the PHP Executable link and
add a PHP Executable in the PHP
Executable Preferences page. The PHP
Executables must match the Debugger type.
Select the PHP Debugger
to be used. PDT supports both the Zend
Debugger and XDebug.
Under PHP File, click Browse
and select your file
Marking the Breakpoint checkbox
will result in the debugging process pausing at the first line of code.
If necessary, you can add
arguments in the PHP Script Arguments tab to simulate command line inputs.
Click Apply and then Debug.
Click Yes if asked whether
to open the PHP Debug Perspective.
|
A number of views will open with relevant debug information.
See the "Running and Analyzing
Debugger results" topic for more information on the outcome of
a debugging process. |
Note:
If the file contains 'include' or 'require' calls to
files which are not contained within the project, you must add
them to the project's Include Path in order to simulate your production
environment.