This tutorial will teach you how to debug files and applications both remotely and locally in order to gain maximum efficiency and accuracy from your files and projects.
Zend Studio's Debugging feature can detect and diagnose errors in PHP code situated locally or on remote servers. The debugger allows you to control the execution of your program by setting breakpoints, suspending launched programs, stepping through your code, and examining the contents of variables.
Debugging should be used at stages where your scripts and applications are formed sufficiently to be tried and tested.
In this tutorial, you will learn:
Our first step will be to create a new local PHP project to work with in this tutorial.
|
|
|
To create a new local project:
|
We will now debug a local PHP file using Zend Studio's internal debugger.
|
|
|
To debug a file using the internal debugger:
The debugging process will currently have stopped where your first <?php label appears.
|
|
Files can also be debugged remotely using the Debugger situated on your server. Use this function if you want to test the execution of the file on your production environment. This is especially relevant if your server's loaded extensions are different than the local environment.
Note:
Your server must be running the Zend
Debugger or XDebug in order for remote debugging and
profiling capabilities to function.
The Zend Debugger comes bundled with
Zend Server,
but can also be downloaded
as a separate component from http://www.zend.com/en/products/studio/downloads. For instructions on manually installing the Zend Debugger, see Installing the Zend Debugger.
|
|
|
To
debug a file remotely:
|
|
Zend Studio also allows you to debug applications, projects or files that are already on the server. You can debug either the local (Workspace) copy of files or the server copy of files.
Note:
Your server must be running the Zend
Debugger or XDebug in order for remote debugging and
profiling capabilities to function.
The Zend Debugger comes bundled with
Zend Server,
but can also be downloaded
as a separate component from http://www.zend.com/en/products/studio/downloads. For instructions on manually installing the Zend Debugger, see Installing the Zend Debugger.
|
|
|
To debug applications on a server:
|
|
|
|
|
Related Links:
|
|
|
©1999-2013 Zend Technologies LTD. All rights reserved.