Documentation‎ > ‎

Debugging: Variable Browsing

posted Feb 14, 2010, 3:58 AM by Raymond Bokenkamp

Introduction

Using this library you can browse the content of complex variables, one nested level at the time by using commands such as zoomin, zoomout and exit. Currently, this class should only be used for command line applications. Web browsable functionality will be added later using through firephp/firebug.

Example

By executing the snippet below you will see the following screen. At this point you can decide to exit (or zoomout), or zoom in to nested variable links [1] and [2].


<?php

require_once("rawdev/RawDev.php");
require_once(RAWDEV_LIB.'/Util/Dumper.php'); 

class Test {

var $a='hi';
var $b = array(1, 2);

}

$complex = array(1, 'hi', array(99, 17), 'std' => new stdClass(), new Test(), array());

RDumper::dump($complex);

?>

Conclusion

For command line application development this beats var_dump and will save you a ton of time when debugging.

Links

RDumper API Doc

Future enhancements

Color coding?
Comments