
|
To debug a PHP Web Page:
Set breakpoints at the relevant places in the
file that you would like to debug and save the file.
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 Web Page option to create
a new debug configuration.

Enter a name for the new configuration.
Select the Server Debugger to be used. PDT supports
both the Zend Debugger and XDebug.
Select your server from the list.
If you have not yet configured your server, click the underlined 'PHP
Servers' shortcut. The Servers preferences page will open. Configure your
server by following the instructions on 'adding
a new server' under the PHP Servers Preferences page.
Under PHP File, click Browse and select the first
file which launches your application.
If the files do not yet exist on the server, you
will need to publish them before they are debugged by doing the following:
Ensure that the Publish Projects to this Server
checkbox is marked within the Server settings, and specify the Directory
to which the files should be published. (To do this, click Configure under
the Server category.)
Mark the Publish files to Server checkbox and,
if necessary, add the root folder to which you would like to publish the
file in the 'Publish To' box.
Ensure that the URL is correct. If it is not correct,
unmark the Auto Generate checkbox and manually change the URL.
For further debug options, select the Advanced
tab, which has the following options:
Open in Browser
- Mark if you would like the application to be displayed in PDT's internal
browser while it is run.
Choose whether
to:
Debug All Pages
- The specified page and all the pages linked to it are debugged. The
browser waits for the debug of each page before displaying it.
Debug First Page
Only - Only the first page is debugged.
Start Debug from
- Select the URL from which you would like the Debugging process to start.
Continue Debug
from this Page - Selecting this option will result in all the
pages linked to the URL being debugged.
Click Apply and then Debug.
Click Yes if asked whether to open the PHP Debug
Perspective.
|