Overview

I like pretty things! And I believe that pretty debug messages can go a long way in speeding up finding and fixing the problem.

So without further ado here is what pdebug() and pdie() output looks like:

How to use

The function names are self explanatory. All you have to do is include the “pdebug.php” file and then call the functions. pdie() will obviously terminate the process.

Both pdebug() and pdie() can output anything you give them as parameters. They even support the sprintf() format.

//include the source file
require( "pdebug.php" );

//some test function
function test( ){
	pdebug( "The value is: %d", 3 );
}

//testing the code
test();
pdie( "Something is terribly WRONG!" );

Source Code

Download ZIP Archive

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.