Helping ordinary people create extraordinary websites!

PHP Debugging with Zend Studio

By Michael J. Ross
2008-02-03

Stepping Through the Code

Using the Step Over command several times, we can step down through the code to line number 59, which calls the display_workers() function. If we then use the Step Into command, the debugger goes to line 43, which is the first line of code in that function. If we step forward to line 48, the $worker_data array has been populated with the first record. In the Debug window, if the Variables tab has been selected (as it is by default), then you can see the current defined variables, including that array. Clicking the "+" symbol expands the array, showing the individual elements and their current values.

As you continue to Step Over the lines of code, cycling within the "for" loop, you will see the elements of $worker_data automatically updated.

In the Debug Output window, in the Text panel, you will see all of the HTML resulting from the code executed up to that point.

The HTML tab shows the output as displayed by a Web server.

If at any point you Run the debugger to the end of the script, the Text tab will show the completed Web code.

The HTML tab shows the final Web page.





Tutorial pages:
 3 Votes

You might also want to check these out:


Leave a Comment on "PHP Debugging with Zend Studio"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS