This debugger started as a simple development helper function for my hobby work in 2005. Its only task was to simplify the call of print_r in an HTML readable layout like this:

echo "

It wrote a simple red box directly into the current output of your html document, with nothing more then this print_r result and a click-able caption to collapse or expand this message to save space.

Hello world!

Here is the code:

function __debug($v){
	$id = "info".md5(microtime(1));
	$styleSpan = "color: red; cursor: pointer; font-size: xx-small;";
	$stylePre = "position: relative; z-index: 1; left: 0px; top: 0px; background: white; border: 1px solid red; cursor: default; text-align: left;";
	$v = htmlspecialchars(print_r($v,true));
	#if(empty($v)) $v = "EMPTY";
	echo "<__debug>"
"; }

Since then, this function had a lot of new revisions and has grown to be a useful tool now – as I try to describe in the next chapters. I hope you enjoy this piece of history and excuse my poor or pragmatic programming style at this time, but always remember: it was only a development helper function for me, not for the public!

Have fun!