PHP
  Home arrow PHP arrow Debugging Program Flow with the Xdebug Extension
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Debugging Program Flow with the Xdebug Extension
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2009-02-23


    Table of Contents:
  • Debugging Program Flow with the Xdebug Extension
  • Review: getting information about PHP objects with the var_dump() function
  • Debugging program flow with the xdebug_start_code_coverage() and xdebug_get_code_coverage() functions
  • Using the xdebug_start_code_coverage() and xdebug_get_code_coverage() functions with a basic class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Debugging Program Flow with the Xdebug Extension
    ( Page 1 of 4 )

    The Xdebug PHP extension combines a set of powerful functions with an easy learning curve. This appealing mixture turns it into the choice of many PHP developers for debugging PHP applications with a great level of detail. If you want to learn how to get the most out of this debugging library without having to spend long hours reading its user manual, then keep reading. In this seven-part series of articles you’ll find an approachable guide to utilizing its most important functions. I will use numerous code samples to instruct you in the use of the Xdebug extension.

    Introduction

    Of course, if you already read the previous tutorial of the series, then you're already familiar with using a few simple, yet useful, functions provided by the Xdebug extension, such the popular “var_dump()” function. As you’ll possibly recall, the extension offers an enhanced version of this function that lets you get detailed information about one or more PHP variables.

    What’s more, when used with an object, the “var_dump()” function permits you to retrieve a complete set of parameters, including the name of the properties of the targeted object, and their types and values. This feature can be pretty useful when debugging object-based PHP programs.

    Nonetheless, the X-debug extension comes equipped with many other functions that allow you to perform all sorts of debugging tasks. So, provided that you’re interested in learning a bit more, in this fourth article I’ll be explaining how to use the complementary “xdebug_start_code_coverage()” and “xdebug_get_code_coverage()” functions. They can help you keep track of which lines are executed by a specified PHP program.

    The usage of these functions is very interesting, trust me, so don’t waste more time in preliminaries. Start reading about them now!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT