Xdebug Update: August 2023
In this monthly update I explain what happened with Xdebug development in the past month. These are normally published on the first Tuesday on or after the 5th of each month.
Patreon and GitHub supporters will get it earlier, around the first of each month.
You can become a patron or support me through GitHub Sponsors. I am currently 36% towards my $2,500 per month goal, which is set to allow continued maintenance of Xdebug.
If you are leading a team or company, then it is also possible to support Xdebug through a subscription.
In the last month, I spend around 27 hours on Xdebug, with 32 hours funded.
Towards Xdebug 3.3
In August I mostly spent my time on improving Xdebug's xdebug_get_function_stack() function and stack traces with regard to chained exceptions.
A feature request asked whether it would be possible to add the local variables for each stack frame that is returned with the xdebug_get_function_stack() function. Xdebug can already show local variables for the top most frame when it shows stack traces (through the xdebug.show_local_vars setting), but the function's result don't include them.
When implementing this feature, I noticed that arguments were being returned as strings, instead of actual values, as part of each stack frame. I created an issue for that and implemented that as well.
When the original requester tried out the new feature, it turned out that he wanted to do this in a user-defined exception handler. However, at that stage, the original stack has been destroyed, and Xdebug no longer could access that information.
To work around this, I now cache the stack when an exception gets thrown so that the cached version then can be requested when calling xdebug_get_function_stack() with the new from_exception option.
That looks like:
<?php
class Handlers
{
function __construct(private string $title, private float $PIE) {}
static function exceptionHandler($exception)
{
$s = xdebug_get_function_stack( [ 'from_exception' => $exception ] );
var_dump($s);
}
}
class Error_Entry
{
public function __construct($base, $errno)
{
throw new Exception();
}
}
set_exception_handler(['Handlers', 'exceptionHandler']);
$e = new Error_Entry(1, 2);
?>
Xdebug's cache is eight items big, which allows for 8 rethrown/chained exception stacks to be remembered.
Because of this cache it was now also (finally) possible to resolve issue #450 and issue #476. This now means that chained and rethrown exceptions are now displayed when Xdebug shows a stack trace, whether it is on the CLI, or in an HTML context.
Over the next few months I will continue to work on the features and issues on the 3.3 roadmap, without any guarantees these tickets will be implemented.
If you have comments, suggestions, or if your company wants to help fund features, please reach out, or leave comments on the document.
Xdebug Videos
I have published one new videos in the last month:
Let me know what you'd like to see!
You can find all previous videos on my YouTube channel.
Business Supporter Scheme and Funding
In the last few months, two new business supporters signed up:
REWE Digital GmbH through the Supporter Scheme, and Clever Age on Patreon.
If you, or your company, would also like to support Xdebug, head over to the support page!
Besides business support, I also maintain a Patreon page, a profile on GitHub sponsors, as well as an OpenCollective organisation.
Xdebug Cloud
Xdebug Cloud is the Proxy As A Service platform to allow for debugging in more scenarios, where it is hard, or impossible, to have Xdebug make a connection to the IDE. It is continuing to operate as Beta release.
Packages start at £49/month, and I have recently introduced a package for larger companies. This has a larger initial set of tokens, and discounted extra tokens.
If you want to be kept up to date with Xdebug Cloud, please sign up to the mailinglist, which I will use to send out an update not more than once a month.
Life Line
What new fresh hell is this?
"Please click here and tick the box if you DO NOT want to be opted in."
And when you click on the non-visible link:
"[ ] I DO NOT want to be opted in."
@jamesholden Have you ever seen the Expanse? One of the main characters shares your name!
I walked 4.4km in 51m58s
I walked 8.2km in 1h40m07s
I walked 2.4km in 38m25s
@Edent With your ActivityPub implementation, have you figured out how to allow quote posts for your bot posts yet?
📷 Brown Cap in the Grass
🚩 Herikhuizerweg, Rheden, Nederland
I walked 0.9km in 11m17s
I walked 2.8km in 25m32s
I walked 4.6km in 1h8m02s
📷 Stalkers Lane
🚩 Graywood Lane, Wealden, United Kingdom
I hiked 23.0km in 4h10m15s
I walked 3.9km in 39m07s
After my PHP 8.5 in Leeds last night, it's now time to head to Rotterdam to give the same talk there tonight!
It's cold out here, but atleast the snow is now gone.
I walked 1.7km in 13m18s
📷 Avenue Gardens
🚩 Princess Road, London Borough of Brent, United Kingdom
📷 Leafy Entrance
🚩 East Heath Road, London Borough of Camden, United Kingdom
📷 From Green to Yellow.
🚩 St John's Wood Road, City of Westminster, United Kingdom
I walked 9.1km in 1h56m24s







Shortlink
This article has a short URL available: https://drck.me/xdebug-23aug-i18