toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

291
active users

#xdebug

1 post1 participant0 posts today
Derick Rethans<p>📼 I've made a new video, demoing a new feature coming up in Xdebug 3.5: Skipping lines, files, and directories while debugging: <a href="https://youtu.be/hYmCjrBwNNg" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">youtu.be/hYmCjrBwNNg</span><span class="invisible"></span></a></p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a></p>
Derick Rethans' Blog<b>Xdebug Update: August 2025</b><br><a href="https://derickrethans.nl/xdebug-update-august-2025.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>In this monthly update I explain what happened with Xdebug development.</p><p><a href="https://github.com/sponsors/derickr/" rel="nofollow noopener" target="_blank">GitHub</a> and <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">Pro/Business supporters</a> will get it earlier, around the first of each month.</p><p>In the last month, I spend around 27 hours on Xdebug, with 29 hours funded.</p><p><strong>Xdebug 3.4</strong></p><p>I spend a fair amount of time trying to triage <a href="https://bugs.xdebug.org/2359" rel="nofollow noopener" target="_blank">bug #2359</a> where Xdebug is interfering with Lazy Objects, which were introduced in PHP 8.4. However, there is no small reproducible case, and I have not managed to reproduce this myself at all.</p><p>However, I did manage to get to the bottom of <a href="https://bugs.xdebug.org/2328" rel="nofollow noopener" target="_blank">bug #2328</a>. This ended up being reference counting in PHP and resources (such as open file pointers) not being quite compatible. Instead of holding on to these resources when I keep the stack traces when an Exception occurs, I now instead ignore these.</p><p>These resource types are <a href="https://github.com/php/php-tasks/issues/6" rel="nofollow noopener" target="_blank">being phased out in PHP</a>, as they are the source of many other issues as well. But, file and stream resources have not been ported yet.</p><p>I also fixed a <a href="https://bugs.xdebug.org/2360" rel="nofollow noopener" target="_blank">bug</a> where sometimes internal PHP objects (such as <code>DateTimeInterval</code>) would cause a crash when debugging.</p><p>I will make a release in early September to get these fixes out.</p><p><strong>PHP 8.5</strong></p><p>Most of the time this month I spent on making Xdebug PHP 8.5 ready.</p><p>Last month I wrote about a <a href="https://github.com/php/php-src/pull/19377" rel="nofollow noopener" target="_blank">patch for PHP</a> that I created to introduce intermediate steps between pipe stages. With this, <a href="https://news-web.php.net/php.internals/128473" rel="nofollow noopener" target="_blank">I discovered a parser issue with PHP's implementation of pipes</a>, and especially when closures were used. Due to the precedence order, something went awry.</p><p>This has now been <a href="https://github.com/php/php-src/pull/19533" rel="nofollow noopener" target="_blank">addressed in PHP</a>, and my patch to introduce intermediate steps has also been merged after adjusting it slightly. I have also merged the Xdebug side of this feature into to the master branch.</p><p>The rest of the PHP 8.5 work was mostly due to Opcache now always being enabled. This caused some churn in my test cases and CI workflows, where I would load <code>opcache.so</code> conditionally. With PHP 8.5 this library no longer exists as Opcache is now built-in.</p><p><strong>Native Path Mapping</strong></p><p>I continued investigating how to implement "skip" for native path mapping, and am planning to get this implemented in early September. It is a fair amount of work, as I need to adjust my data structures and parser rules.</p><p><strong>Xdebug Videos</strong></p><p>I have created no new videos in the last months.</p><p>All Xdebug videos can be watched on my <a href="https://www.youtube.com/playlist?list=PLg9Kjjye-m1g_eXpdaifUqLqALLqZqKd4" rel="nofollow noopener" target="_blank">channel</a>.</p><p>If you have any suggestions, feel free to reach out to <a href="https://phpc.social/@derickr" rel="nofollow noopener" target="_blank">me on Mastodon</a> or via <a href="http://derickrethans/who.html" rel="nofollow noopener" target="_blank">email</a>.</p><p><strong>Business Supporter Scheme and Funding</strong></p><p>On GitHub sponsors, I am currently 42% towards my $2,500 per month goal, which is set to allow continued of Xdebug.</p><p>If you are leading a team or company, then it is also possible to support Xdebug through <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">a subscription</a>.</p><p>In the last month, no new business supporters signed up.</p><p>Besides business support, I also maintain a <a href="https://www.patreon.com/derickr" rel="nofollow noopener" target="_blank">Patreon</a> page, a profile on <a href="https://github.com/sponsors/derickr" rel="nofollow noopener" target="_blank">GitHub sponsors</a>, as well as an <a href="https://opencollective.com/xdebug" rel="nofollow noopener" target="_blank">OpenCollective</a> organisation.</p><p>If you want to contribute to specific projects, you can find those on the <a href="https://xdebug.org/funding" rel="nofollow noopener" target="_blank">Projects</a> page.</p><p><strong>Xdebug Cloud</strong></p><p><a href="https://xdebug.cloud" rel="nofollow noopener" target="_blank">Xdebug Cloud</a> is the <em>Proxy As A Service</em> 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.</p><p>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.</p><p>If you want to be kept up to date with Xdebug Cloud, please sign up to the <a href="https://xdebug.cloud/newsletter" rel="nofollow noopener" target="_blank">mailing list</a>, which I will use to send out an update not more than once a month.</p>
Derick Rethans<p>Once <a href="https://github.com/php/php-src/pull/19670" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/php/php-src/pull/19</span><span class="invisible">670</span></a> gets merged, and the accompanying patch for Xdebug, you will be able to see the intermediate values passing through PHP 8.5's pipes!</p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/php85" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php85</span></a> <a href="https://phpc.social/tags/pipes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pipes</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a></p>
github.com/ghostwriter<p>If you and your team find <a href="https://phpc.social/tags/Xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xdebug</span></a> useful, please consider supporting the project.</p><p><a href="https://xdebug.org/support" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">xdebug.org/support</span><span class="invisible"></span></a></p>
Xdebug<p>🥳 Xdebug 3.4.5 Released!</p><p>🐛 This is a bug fix release.</p><p>🧬 One fix addresses crashes when using Xdebug's debugger with (nested) Fibers.</p><p>↪️ A second bug addresses an issue where, while debugging, Xdebug sometimes calls get property hooks which can then update and change the object's state.</p><p>📄 The full list of changes can be found on the updates page: <a href="https://xdebug.org/announcements/2025-07-14" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">xdebug.org/announcements/2025-</span><span class="invisible">07-14</span></a></p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a></p>
github.com/ghostwriter<p>Code coverage with Fibers in <a href="https://phpc.social/tags/Xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xdebug</span></a> is looking solid!</p><p>Patch #1025 works flawlessly in my codebase. </p><p>Thank you, <span class="h-card" translate="no"><a href="https://phpc.social/@derickr" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>derickr</span></a></span> </p><p>No rush on the merge, I appreciate your careful approach and attention to detail.</p><p>:elephpant_black: <a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a></p>
Derick Rethans' Blog<b>Xdebug Update: June 2025</b><br><a href="https://derickrethans.nl/xdebug-update-june-2025.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>In this monthly update I explain what happened with Xdebug development.</p><p><a href="https://github.com/sponsors/derickr/" rel="nofollow noopener" target="_blank">GitHub</a> and <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">Pro/Business supporters</a> will get it earlier, around the first of each month.</p><p>In the last month, I spend around 22 hours on Xdebug, with 21 hours funded.</p><p><strong>Xdebug 3.4</strong></p><p><strong>Native Path Mapping</strong></p><p><strong>Xdebug Videos</strong></p><p><strong>Business Supporter Scheme and Funding</strong></p><p><strong>Xdebug Cloud</strong></p>
Derick Rethans' Blog<b>Xdebug Update: June 2025</b><br><a href="https://derickrethans.nl/xdebug-update-june-2025.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>In this monthly update I explain what happened with Xdebug development.</p><p><a href="https://github.com/sponsors/derickr/" rel="nofollow noopener" target="_blank">GitHub</a> and <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">Pro/Business supporters</a> will get it earlier, around the first of each month.</p><p>In the last month, I spend around 22 hours on Xdebug, with 21 hours funded.</p><p><strong>Xdebug 3.4</strong></p><p>I spend most of the time this month working on bug fixes, resulting in the mid-month release of Xdebug 3.4.4. Most of the fixes revolved around exceptions and generating stack traces for them.</p><p>While fixing these, I also stumbled upon another <a href="https://bugs.xdebug.org/2354" rel="nofollow noopener" target="_blank">bug</a>. The issue here was that Xdebug wouldn't include the argument name for <code>__invoke()</code> call frames in its output. This only matters to PHP 8.1 and before though.</p><p>The rest of the month I spend on trying to resolve the code-coverage-with-fibers issue that I wrote about last month.</p><p>I now have a <a href="https://github.com/xdebug/xdebug/pull/1025" rel="nofollow noopener" target="_blank">Pull Request</a> that addresses the original bug and crash, but it does not yet fix all the problems that I discovered while running the test suite of <a href="https://github.com/reactphp/async" rel="nofollow noopener" target="_blank">reactphp/async</a> with code coverage enabled. Therefore I did not manage to make another release this month addressing this issue. I hope to finalise this by the end of July.</p><p><strong>Native Path Mapping</strong></p><p>I have only played around with this during some demos in presentations showing this feature, but I did not make any progress with the feature itself.</p><p>It also seems that the PhpStorm team has looked at my <a href="https://youtrack.jetbrains.com/issue/WI-81344/Cant-Set-Breakpoints-in-Template-Files-Even-Though-I-Added-The-File-Name-Pattern-to-PHP" rel="nofollow noopener" target="_blank">bug report</a> either.</p><p><strong>Xdebug Videos</strong></p><p>I have created one new video in the last months:</p><ul><li><p><a href="https://youtu.be/8tHKq_5-cXo" rel="nofollow noopener" target="_blank">Xdebug 3.5: Native Path Mapping Teaser</a></p></li></ul><p>All Xdebug videos can be watched on my <a href="https://www.youtube.com/playlist?list=PLg9Kjjye-m1g_eXpdaifUqLqALLqZqKd4" rel="nofollow noopener" target="_blank">channel</a>.</p><p>If you have any suggestions, feel free to reach out to <a href="https://phpc.social/@derickr" rel="nofollow noopener" target="_blank">me on Mastodon</a> or via <a href="http://derickrethans/who.html" rel="nofollow noopener" target="_blank">email</a>.</p><p><strong>Business Supporter Scheme and Funding</strong></p><p>On GitHub sponsors, I am currently 42% towards my $2,500 per month goal, which is set to allow continued of Xdebug.</p><p>If you are leading a team or company, then it is also possible to support Xdebug through <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">a subscription</a>.</p><p>In the last month, no new business supporters signed up.</p><p>Besides business support, I also maintain a <a href="https://www.patreon.com/derickr" rel="nofollow noopener" target="_blank">Patreon</a> page, a profile on <a href="https://github.com/sponsors/derickr" rel="nofollow noopener" target="_blank">GitHub sponsors</a>, as well as an <a href="https://opencollective.com/xdebug" rel="nofollow noopener" target="_blank">OpenCollective</a> organisation.</p><p>If you want to contribute to specific projects, you can find those on the <a href="https://xdebug.org/funding" rel="nofollow noopener" target="_blank">Projects</a> page.</p><p><strong>Xdebug Cloud</strong></p><p><a href="https://xdebug.cloud" rel="nofollow noopener" target="_blank">Xdebug Cloud</a> is the <em>Proxy As A Service</em> 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.</p><p>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.</p><p>If you want to be kept up to date with Xdebug Cloud, please sign up to the <a href="https://xdebug.cloud/newsletter" rel="nofollow noopener" target="_blank">mailing list</a>, which I will use to send out an update not more than once a month.</p>
Ben Ramsey<p>I haven’t had many problems with <a href="https://phpc.social/tags/PhpStorm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PhpStorm</span></a>’s <a href="https://phpc.social/tags/Xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xdebug</span></a> integration in a long time. Most of the time, it Just Works, but today, it decided it doesn’t like me, and so now, my afternoon has been spent trying to get it to work again.</p><p>This is the error I see in the step debugging console. The only thing I know has changed is PhpStorm (it upgraded).</p><p>```<br>Cannot find file '/path/to/ramsey/uuid/Standard input code' locally.<br>```</p><p><a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a></p>
Xdebug<p>🥳 Xdebug 3.4.4 Released!</p><p>🐞 This is a bug fix release that fixes a few crashes with regard to exceptions. This was a regression from Xdebug 3.4.3.</p><p>📄 The full list of changes can be found on the updates page: <a href="https://xdebug.org/announcements/2025-06-12" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">xdebug.org/announcements/2025-</span><span class="invisible">06-12</span></a></p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a> <a href="https://phpc.social/tags/fix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>fix</span></a> <a href="https://phpc.social/tags/release" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>release</span></a></p>
Derick Rethans' Blog<b>Xdebug Update: May 2025</b><br><a href="https://derickrethans.nl/xdebug-update-may-2025.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>In this monthly update I explain what happened with Xdebug development.</p><p><a href="https://github.com/sponsors/derickr/" rel="nofollow noopener" target="_blank">GitHub</a> and <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">Pro/Business supporters</a> will get it earlier, around the first of each month.</p><p>In the last month, I spend around 20 hours on Xdebug, with 22 hours funded.</p><p>My apologies for missing several monthly reports.</p><p><strong>Xdebug 3.4</strong></p><p><strong>Code Coverage with Fibers</strong></p><p><strong>Native Path Mapping</strong></p><p><strong>Xdebug Videos</strong></p><p><strong>Business Supporter Scheme and Funding</strong></p><p><strong>Xdebug Cloud</strong></p>
Xdebug<p>🥳 Xdebug 3.4.3 Released!</p><p>🐞 This is a bug fix release that fixes a few crashes.</p><p>↪️ It improves debugging with PHP 8.4's property hooks by recognising that they have code attached, and no longer throwing fatal errors or exceptions in some situations.</p><p>📄 The full list of changes can be found on the updates page: <a href="https://xdebug.org/announcements/2025-05-14" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">xdebug.org/announcements/2025-</span><span class="invisible">05-14</span></a></p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a> <a href="https://phpc.social/tags/fix" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>fix</span></a> <a href="https://phpc.social/tags/release" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>release</span></a></p>
Ben Ramsey<p><span class="h-card" translate="no"><a href="https://mastodon.social/@zapiz" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>zapiz</span></a></span> Xdebug is amazing, as others have suggested.</p><p>I also ensure full coverage with unit tests, using PHPUnit.</p><p><a href="https://phpc.social/tags/PHP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHP</span></a> <a href="https://phpc.social/tags/Xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xdebug</span></a> <a href="https://phpc.social/tags/PHPUnit" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PHPUnit</span></a></p>
Dan Leech<p>made some practical improvements today including a COMMAND mode to enter raw DBGP commands (e.g. set a breakpoint)- so that I can start using it for work tomorrow.</p><p>My next feature will either be the ability to go "back" in the history or to show the local vars / properties. <a href="https://fosstodon.org/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://fosstodon.org/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://fosstodon.org/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a></p>
Derick Rethans<p>Do you use VS Code and the PHP Debug plugin to use <span class="h-card" translate="no"><a href="https://phpc.social/@Xdebug" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>Xdebug</span></a></span>?</p><p>It'd mean the world to us to leave a nice/constructive review:<br><a href="https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug&amp;ssr=false#review-details" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">marketplace.visualstudio.com/i</span><span class="invisible">tems?itemName=xdebug.php-debug&amp;ssr=false#review-details</span></a></p><p><a href="https://phpc.social/tags/vscode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vscode</span></a> <a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a></p>
Derick Rethans' Blog<b>Missing Characters</b><br><a href="https://derickrethans.nl/missing-characters.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>I release a new version of <a href="https://xdebug.org" rel="nofollow noopener" target="_blank">Xdebug</a> on Sunday, which fixes a few bugs. One of them is titled <a href="https://bugs.xdebug.org/2319" rel="nofollow noopener" target="_blank">emoji character become diamond question marks</a>. This bug turned out to be the same as <a href="https://bugs.xdebug.org/2323" rel="nofollow noopener" target="_blank">var_dump does not output some Russian characters</a>, which was originally reported a few days earlier but hadn't come with a decent enough reproducible case.</p><p>At first I dismissed this, as it's not unlikely that people get their character sets wrong, or mixed up.</p><p>But when I tested it, the following script really did not show the right result:</p><pre></pre><p>Instead of the expected:</p><pre><pre>Standard input code:3:string 'hello 👍' <i>(length=10)</i> </pre></pre><p>It showed:</p><pre><pre>Standard input code:3:string 'hello ���' <i>(length=10)</i> </pre></pre><p>The four bytes that should have made up the 👍 had turned into three.</p><p>Xdebug uses a function, <code>xdebug_xmlize</code>, to escape XML and XHTML-special characters such as <code>"</code>, <code>&amp;</code>, and <code>&lt;</code> when it outputs strings of data.</p><p>Its algorithm first calculates how much memory the resulting string would use by looping over the source characters, and adding the lengths of the escaped characters together. It uses a <a href="https://github.com/xdebug/xdebug/blob/3.4.2/src/lib/var.c#L1028" rel="nofollow noopener" target="_blank">256-entry table</a> for this.</p><p>The first row shows that byte 0's escaped length will be <code>4</code> (for <code>�</code>) and the LF character's escaped length will be <code>5</code> (for <code> </code>).</p><p>The replacement strings are recorded in the <a href="https://github.com/xdebug/xdebug/blob/3.4.2/src/lib/var.c#L1047" rel="nofollow noopener" target="_blank">table that follows</a>. It only has place for <code>64</code> elements, as none of the bytes above byte-64 need to be escaped. You can see that because the <code>xml_encode_count</code> table only has entries containing <code>1</code> after the fourth 16-element row.</p><p>Then in a second iteration it loops over all the source characters again to construct the resulting output.</p><p>In this iteration, it checks if the <a href="https://github.com/xdebug/xdebug/blob/3.4.2/src/lib/var.c#L1083" rel="nofollow noopener" target="_blank">destination length is 1</a>, in which case it just copies the character over. If the destination length is not <code>1</code>, then it adds the number of characters that correspond to the <a href="https://github.com/xdebug/xdebug/blob/3.4.2/src/lib/var.c#L1086" rel="nofollow noopener" target="_blank">destination character's length</a>.</p><p>The bug here was that the table for <code>xml_encode_count</code>, although it was defined as having 256 entries, only had 240 entries. I had missed to add the 16th line, so instead there were only 15 lines of 16 elements.</p><p>And in C, that means that these missing elements were all set to <code>0</code>. This meant that if there was a character in the source string where the byte value was larger or equal to hexadecimal <code>0xF0</code> (decimal: 240), the algorithm thought the replacement length of these characters would be <code>0</code>. This then resulted in these characters to just be ignored, and not copied over into the destination string.</p><p>For the 👍 character (hex: <code>0xF0 0x9F 0x91 0x8D</code>) that meant that its first byte (<code>0xF0</code>) was not copied into the destination string. And that meant a broken UTF-8 character. Oops! 💩</p><p>In Xdebug 3.4.2 this is now fixed, as I have <a href="https://github.com/xdebug/xdebug/commit/12ecc846a4df079abfbe2497a3acf4bfabebf8b8" rel="nofollow noopener" target="_blank">added the 16th line to the table</a>, with 16 more elements containing <code>1</code>.</p><p>What I did find curious that it took nearly five years for something to report this issue, and with that, two in the same week!</p>
Derick Rethans<p>I have just released <span class="h-card" translate="no"><a href="https://phpc.social/@Xdebug" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>Xdebug</span></a></span> 3.4.2, which fixes:</p><p>💥 two crashes<br>💦 two memory leaks, through patches by <span class="h-card" translate="no"><a href="https://phpc.social/@nielsdos" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>nielsdos</span></a></span><br>↪️ an issue with showing the values of properties with hooks attached<br>💩 an issue where characters with higher order bits were not displayed when using Xdebug's overridden var_dump() function in HTML mode.</p><p>🔗 Read more about it at <a href="https://xdebug.org/announcements/2025-03-09" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">xdebug.org/announcements/2025-</span><span class="invisible">03-09</span></a></p><p><a href="https://phpc.social/tags/php" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>php</span></a> <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> <a href="https://phpc.social/tags/debugging" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>debugging</span></a> <a href="https://phpc.social/tags/NewRelease" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NewRelease</span></a></p>
Derick Rethans' Blog<b>Xdebug Update: January 2025</b><br><a href="https://derickrethans.nl/xdebug-update-january-2025.html" rel="nofollow noopener" target="_blank">Original Post</a><br><br><p>In this monthly update I explain what happened with Xdebug development.</p><p><a href="https://github.com/sponsors/derickr/" rel="nofollow noopener" target="_blank">GitHub</a> and <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">Pro/Business supporters</a> will get it earlier, around the first of each month.</p><p>In the last month, I spend around 18 hours on Xdebug, with 25 hours funded.</p><p><strong>Xdebug 3.4</strong></p><p>At the start of the month I released Xdebug 3.4.1, which fixes a few crash bugs when deciding whether to activate a specific feature.</p><p>During the rest of the month, I fixed an issue where PHP 8.4's new property hooks would <a href="https://bugs.xdebug.org/view.php?id=2314" rel="nofollow noopener" target="_blank">not show their content</a> in the debugger.</p><p><strong>Foreach Woes</strong></p><p>Besides the Xdebug 3.4 general bug fixes, I have also been looking at addressing a long-standing issue where using <code>foreach</code> produces some unexpected results when doing path and branch coverage. I wrote an article called <a href="https://derickrethans.nl/figuring-out-foreach.html" rel="nofollow noopener" target="_blank">Figuring Out Foreach</a> to explain the problem.</p><p>The fix however is trickier, and I am inclined to roll that up into a big patch that refactors Code Coverage into an analysis pass, and a collection pass. The patch sits in a <a href="https://github.com/derickr/xdebug/tree/improve-code-coverage" rel="nofollow noopener" target="_blank">branch</a> and addresses some other long <a href="https://bugs.xdebug.org/1799" rel="nofollow noopener" target="_blank">outstanding inaccuracies</a>.</p><p>I recently have rebranched this patch on Xdebug's master again, so it is fully functional (minus the foreach changes), but unfortunately it is a little slower than what currently is available in Xdebug. I might decide to release it with this slight performance degradation in Xdebug 3.5 or 3.6 regardless.</p><p><strong>Xdebug Videos</strong></p><p>I have created one new video in the last two months:</p><ul><li><p><a href="https://youtu.be/jBvrVpNHOCw" rel="nofollow noopener" target="_blank">Xdebug 3.4: Control Socket</a></p></li></ul><p>All Xdebug videos can be watched on my <a href="https://www.youtube.com/playlist?list=PLg9Kjjye-m1g_eXpdaifUqLqALLqZqKd4" rel="nofollow noopener" target="_blank">channel</a>.</p><p>If you have any suggestions, feel free to reach out to <a href="https://phpc.social/@derickr" rel="nofollow noopener" target="_blank">me on Mastodon</a> or via <a href="http://derickrethans/who.html" rel="nofollow noopener" target="_blank">email</a>.</p><p><strong>Business Supporter Scheme and Funding</strong></p><p>On GitHub sponsors, I am currently 40% towards my $2,500 per month goal, which is set to allow continued of Xdebug.</p><p>If you are leading a team or company, then it is also possible to support Xdebug through <a href="https://xdebug.org/support" rel="nofollow noopener" target="_blank">a subscription</a>.</p><p>In the last month, no new business supporters signed up.</p><p>Besides business support, I also maintain a <a href="https://www.patreon.com/derickr" rel="nofollow noopener" target="_blank">Patreon</a> page, a profile on <a href="https://github.com/sponsors/derickr" rel="nofollow noopener" target="_blank">GitHub sponsors</a>, as well as an <a href="https://opencollective.com/xdebug" rel="nofollow noopener" target="_blank">OpenCollective</a> organisation.</p><p>If you want to contribute to specific projects, you can find those on the <a href="https://xdebug.org/funding" rel="nofollow noopener" target="_blank">Projects</a> page.</p><p><strong>Xdebug Cloud</strong></p><p><a href="https://xdebug.cloud" rel="nofollow noopener" target="_blank">Xdebug Cloud</a> is the <em>Proxy As A Service</em> 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.</p><p>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.</p><p>If you want to be kept up to date with Xdebug Cloud, please sign up to the <a href="https://xdebug.cloud/newsletter" rel="nofollow noopener" target="_blank">mailinglist</a>, which I will use to send out an update not more than once a month.</p>
Ben Ramsey<p><span class="h-card" translate="no"><a href="https://orwell.fun/users/tassoman" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>tassoman</span></a></span> I used to be on team var_dump() for many years, until I saw the light and switch to <a href="https://phpc.social/tags/Xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Xdebug</span></a>. I’m not sure how I ever wrote code without a step debugger before!</p>
Larry Garfield<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@mapache" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mapache</span></a></span> As long as I have <a href="https://phpc.social/tags/xdebug" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>xdebug</span></a> hooked up and working. :-)</p>