Home arrow PHP arrow The X-debug Extension

The X-debug Extension

If you program at all, you understand the necessity of debugging. Fortunately, depending on the language in which you program, you can find an assortment of tools to help you with this task. One very good debugging tool for PHP is the X-debug extension. This seven-part series will reveal its capabilities and help you add it to your programmer's toolbox.

TABLE OF CONTENTS:
  1. The X-debug Extension
  2. Getting started using the X-debug library
  3. Keeping track of file calls with the X-debug extension
  4. Working with the xdebug_call_line() function
By: Alejandro Gervasio
Rating: starstarstarstarstar / 3
February 02, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Without a doubt, debugging is one of the most important tasks that programmers have to tackle when developing both desktop and web-based applications. With PHP, this process can be accomplished more quickly because it’s an interpreted language.

Even so, PHP itself contains a few simple mechanisms that permit you to debug programs at a basic level. For instance, by enabling the “error_reporting” and “display_errors” directives included within its php.ini file, and also by combining “echo” statements along with the popular “var_dump()” function, it’s possible to debug runtime errors with relative ease.

However, there are certain situations that require a more sophisticated debugging process. In cases like these, it’s often necessary to verify other aspects of an application, aside from checking to see if a function is called in the correct sequence, or if a class actually produces the expected output.

On these specific occasions, the ability to evaluate the status of certain variables, measure the time that a script takes to run, and even determine how and when a given class calls its different methods is a must. Naturally, the simplest way to perform a debugging process as detailed as this is to use a third-party library, which can be picked up from the great variety available nowadays.

Even though there are plenty of debugging libraries that can be used in a pretty straightforward fashion with excellent results, there is one useful extension, called “X-debug” (http://x-debug.org) that combines good functionality, an easy learning curve and minimal installation requisites.

So, in this series of articles I’ll be providing you with a brief overview of the main features that come bundled with the X-debug extension, so you can start using it quickly for debugging your own PHP applications with minor hassles.

Now, with the preliminaries out of our way, it’s time to begin exploring the real capabilities of the X-debug package. Let’s jump in!



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

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap

Dev Shed Tutorial Topics: