Xdebug Update: June 2021
In this monthly update I explain what happened with Xdebug development in this past month. These will be published on the first Tuesday 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 55% towards my $2,000 per month goal. If you are leading a team or company, then it is also possible to support Xdebug through a subscription.
In June, I worked on Xdebug for about 48 hours, with funding being around 24 hours, which is only half.
PHP 8.1 Support
PHP 8.1 recently acquired a new Enum type, and I added support for that in Xdebug's myriad of modes, such as tracing, profiling, and debugging.
Enumerations are implemented as a special case of classes, and the step debugger was already be able to communicate these new enums. However, their name and value are displayed as normal class properties, which is less than ideal. The debugging protocol already has facilities for communicating additional information with data, which is what Xdebug now does. IDEs will need to make use of this additional information though.
I also had to make some more tweaks with regard to PHP 8.1's Fibers. Although PHP 8.1 feature freeze is coming up soon, I suspect that I will need to make more tweaks.
Xdebug 3.1
I have continued to work on the issues that were raised by the developer of the PHP Debug Adapter for Visual Studio Code. The main new addition is the xdebug_notify() function that you can use to send variables to the IDE. The IDE can then choose to display this information in a structured way.
I have not yet worked on the UNC paths issue. In order to reproduce it, I need to be able to run Windows' WSL2, which I can't do in my virtualised Windows, and I don't have (or want!) extra hardware to run Windows natively.
Xdebug Cloud
To make Xdebug Cloud applicable in more situations, I recently added the support of being to set your Cloud ID (User Key) through the browser extensions as the value of the Debug Session Name.
I have now improved Xdebug's Shared Secret for triggers, which compares the value that comes in through the browser extensions, with a value as configured in the php.ini file. Only if it matches, would the debugger initiate a connection. The new functionality allows you to specify multiple values, separated by a , as value for xdebug.trigger_value so that you can control which multiple Cloud IDs can initiate a debugging connection. This adds additional protection so that other Xdebug Cloud users with a valid ID can't use the browser extensions against third party web sites to initiate a debug session.
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 revenue will be used to further the development of Xdebug.
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.
Xdebug Videos
I have published two more videos on how to use Xdebug on my YouTube channel.
These are:
-
Xdebug 3: Code Coverage for Websites, where I show how to make a code coverage report from multiple requests to your application
-
Xdebug 3: Debugging Symfony Console Commands, where I set up Xdebug to debug command line tools using Symfony Console commands as an example. I also show how to use Exception Breakpoints.
If you would like to see a 5 to 10 minute long video on another specific topic, feel free to request them through this Google Form.
Business Supporter Scheme and Funding
In June, no new supporters signed up.
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 and a profile on GitHub sponsors.
Life Line
I walked 9.8km in 1h47m38s
I walked 10.2km in 1h34m25s
Whoop! FOSDEM travel and hotel booked. See you in Brussels at the end of January?
I walked 10.6km in 1h48m23s
I walked 3.0km in 33m38s
I walked 0.6km in 11m26s
I walked 6.5km in 1h17m46s
Updated a cafe
Updated a museum
I walked 1.1km in 12m41s
Updated a bench and a waste_basket
Updated a bench
Updated a bench
Updated a bench
I walked 8.0km in 1h44m20s
I walked 7.9km in 1h32m02s
I've just finished reading "Snow Crash" by Neal Stephenson. I found this a fun and excellent read.
I walked 14.7km in 3h51m29s
I walked 0.8km in 8m42s
I walked 6.0km in 1h19m04s
I walked 1.8km in 49m15s
Updated a restaurant
Updated a restaurant
Updated a restaurant
Updated a restaurant


Shortlink
This article has a short URL available: https://drck.me/xdebug-21jun-gew