Pimping Xdebug stack traces

I've always been annoyed by the way how Xdebug's stack traces looked liked. So I spend some time on making them look better. I will show the differences according to the following script:

<?php
    ini_set('xdebug.show_local_vars', 'on');
    ini_set('xdebug.dump_globals', 'on');
    ini_set('xdebug.dump.GET', '*');
    ini_set('xdebug.collect_params', 'on');
    ini_set('xdebug.var_display_max_depth', 2);
    function foo( $a )
    {
        for ($i = 1; $i < $a['foo']; $i++)
        {
        }
    }
    set_time_limit(1);
    $c = new stdClass;
    $c->bar = 100;
    $c->foo = "12";
    $a = array(
        42 => false,
        'foo' => 912125235,
        0 => null,
        3.141592654,
        "testing",
        array(),
        $c, new stdClass,
        fopen( '/etc/passwd', 'r' )
    );
    foo( $a, 42, null, false, "testing",
        $c, fopen( '/etc/passwd', 'r' ) );
?>

Old:

old.scaled.png

New:

new.scaled.png

The code for this will make it into CVS soonish.

Comments

Nice work, will make it a lot more enjoyable to work with xdebug with the new UI :-)

that's much better!

Great, looks much better than a patch I was thinking to submit but I never finished ;)

Add Comment

Name:
Email:

Will not be posted. Please leave empty instead of filling in garbage though!
Comment:

Please follow the reStructured Text format. Do not use the comment form to report issues in software, use the relevant issue tracker. I will not answer them here.


All comments are moderated

Life Line