Subscribe to PHP Freaks RSS

Xdebug Update: June 2020

syndicated from planet-php.net on July 7, 2020

Xdebug Update: June 2020

Another monthly update where 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 supporters will get it earlier, on the first of each month. You can become a patron to support my work on Xdebug. 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 100 hours, with funding being around 70 hours. I worked mostly on the following things:

Xdebug 3

I spent most of my time this month on Xdebug 3. In the first week I made a few changes around the way how you enable specific features. In Xdebug 2, each feature can be turned on at the same time (such as through xdebug.remote_enable, and xdebug.profiler_enable). In Xdebug 3 this has now changed to a single setting xdebug.mode which for step debugging and profiling would have the values debug and profile respectively.

I am also in the process of renaming things to have a more logical meaning. For example I renamed the filter constants XDEBUG_NAMESPACE_BLACKLIST with XDEBUG_NAMESPACE_EXCLUDE. I will continue to rename things on the way towards Xdebug 3, with things such as the xdebug.remote_host likely to become something like xdebug.ide_hostname. I am also hoping to reduce the amount of settings in general.

By separating out the modes and being able to turn them on with one setting, it becomes clearer that it is best not to have all the functionality turned on by default. During the rest of the month I've split out Xdebug's internals so that it is much easier to enable specific information gathering only when it is actually necessary. This should improve performance drastically.

Because Xdebug has lots of old code in it, some of it is still optimised for PHP 5. A new, and more performant, way of handling strings was introduced in PHP 7, but Xdebug has not yet switched over to that new data type. This is what I am currently trying to finalise. Once that is done, I hope to see a performance boost already. Stay tuned for some benchmarks on this.

The upgrade guide has more information about all the changes that are coming to Xdebug 3, but please be aware that these changes are preliminary, and could still change.