
|
|
|||
PHP Debugging with Zend StudioBy Michael J. Ross2008-02-03
Debugging Basics A primary raison d'être of any programmer's IDE is the ability to execute source code, one line at a time, and monitor the program's output, its execution path, and the changing values of its internal variables. Zend Studio's debugger is no exception. The best way to see these capabilities in action, and to learn how to do them yourself, is to follow a straightforward example. In this case, we will use the Debug Demo that is included with Zend Studio. To begin, choose File > Open File, browse to your Zend Studio installation directory, and open the directory bin\examples\debugdemo (in this tutorial, any path names will be in Windows format). Open the file DebugDemo.php. You should see the following in your user interface:
Due to image size limitations in this tutorial, the details of each of the main windows may be difficult to discern. Also, the Debug Output window needs to be widened. So first we will minimize the File Manager and Inspectors windows. They can always be restored by clicking on their named icons in the leftmost column within the overall window.
Now you can increase the width of the Debug Output window. In the Editor window, you will see the Debug Demo code. It is a simple PHP script that first defines an array of worker information, and then uses two different functions to display that information in an HTML table.
The various Zend Studio debugger tools can be accessed from either the debugger toolbar, or the Debug menu. On the debugger toolbar, the functions of the buttons, from left to right, are: Back, Forward, Step Over, Step Out, Step Into, Go, Go to Cursor, Run, Stop Debugger, and Pause Debugger.
All of these functions are available from the Debug menu, as well as some additional ones. Also, the menu bar shows the hotkey combinations, for those who prefer utilizing key commands instead of clicking toolbar icons or selecting menu items.
Tutorial Pages: » Introduction » Overview and Product Editions » System Requirements » Installation and Start Up » User Interface and Preferences » Debugging Basics » Stepping Through the Code » Breakpoints and Conditions » Conclusion |
||||
| About the NetVisits, Inc Network | Write For Us | Advertise Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy. |
Visit other NetVisits, Inc. sites: |