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:
New:
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 ;)
Life Line
If we must show off a little…
In more info innocent times, the hat riots caused some spankings...
100 Years Ago Men and Boys Fought on the Streets of New York Over Wearing Straw Hats Past Summer | The New York Public Library
https://www.nypl.org/blog/2022/09/23/straw-hat-riots-nycI hiked 15.5km in 3h12m14s
📷 Mushroom Village
🚩 Weg van den Prins Willemsberg, Ellecom, Nederland
I walked 2.4km in 59m34s
📷 National Cycle Network 6
🚩 Watford, United Kingdom
I walked 7.6km in 1h54m50s
📷 Tufted Duck Pair
🚩 Outer Circle, City of Westminster, United Kingdom
RE: https://phpc.social/@Xdebug/115662135830755552
I have just released Xdebug 3.5.0!
In the next few weeks I will create some content (text, and perhaps video) highlighting some new features in more detail.
Please share it with the world!
The master branch is now for Xdebug 3.6, targetting PHP 8.6
Back to -dev
Tweak release instructions a little
Go with 3.5.0
Tweak message IDs and severities for control socket log entries
I walked 8.1km in 1h26m40s
I walked 1.1km in 9m28s
I walked 8.5km in 1h30m56s
My whisky of the month for December 2025, is a 15yo Aultmore bottled by Cadenhead's.
Fixed off-by-one error in address length name for control socket on L…
Merged pull request #1050





Shortlink
This article has a short URL available: https://drck.me/p-xdebug-st-4xw