Xdebug 2.1
I've just released Xdebug 2.1. This new release contains all the bug fixes and new features that have been developed over the past three years. It provides full PHP 5.3 support, but it no longer supports PHP versions below 5.1.
A description of all the new features follows:
Error Collection
I've added xdebug_start_error_collection(), xdebug_stop_error_collection() and xdebug_get_collected_errors(), which allow you to collect all notices, warnings and error messages that Xdebug generates from PHP's error_reporting functionality so that you can output them at a later point in your script by hand.
Header Setting Interception
All functions that set HTTP headers such as with header() and setcookie() are now intercepted by Xdebug. The intercepted headers are stored internally in an array that can be retrieved by calling the xdebug_get_headers() function. This is very useful in cases where you need to test certain functionality that sets headers somewhere deep in code. This function is also used in eZ Components' test suite to test whether the correct HTTP headers are set in the MvcTools component.
Variable Assignment Tracing
The new setting xdebug.collect_assignments allows you to record changes to variables in scripts to trace files. I've already written more about it in Variable tracing with Xdebug.
"Scream" Support
The scream PECL extension disables the @ (shut-up) operator to actually see all notices, warnings and errors that PHP generates. The scream extension's functionality have been duplicated as Xdebug's xdebug.scream php.ini setting. Why disabling the @-operator is a good thing, I've already outlined in Five reasons why the shut-op operator (@) should be avoided.
Additions for Stack Traces
All HTML containers generated by Xdebug (error messages, xdebug_var_dump() output) now contain a CSS class for easier styling.
The new setting xdebug.file_link_format allows you to turn any file/line link in Xdebug's output to be decorated to a link with a specific format. For example you can set it to txmt://open/?file://%f&line=%l for opening files directly in Textmate, or gvim://%f@%l with some shell script for gvim and Firefox.
Remote Debugging
The new setting xdebug.remote_connect_back, contributed by Lucas Nealan and Brian Shire, allows Xdebug to try to make a debugging connection to the IP address from which the browser request came from. This setting is an additional solution for debugging with multiple users.
The old gdb and php3 remote debugging engines have been removed.
Overloaded var_dump
The newly introduced setting xdebug.overload_var_dump can be used to turn off Xdebug's default behavior of overriding PHP's var_dump() function with the xdebug_var_dump() function that uses pretty HTML for formatting a variable structure. It does not stop xdebug_var_dump() from working however.
Donations
You can probably imagine that writing and support Xdebug is a time-consuming effort. It's a tool that saves a lot of work during developement of applications, as well while debugging. If you think Xdebug is valuable for you, perhaps you would like to consider a donation. All donations are greatly appreciated and support future development and availablity of Xdebug.
If you want to sponsor a (new) feature in Xdebug, feel free to contact me as well.
Download and Support
The new version of Xdebug can be downloaded through the download page. A list with all changes can be found on the updates page. Support information can be found on the support page, and issues and feature requests can be filed in the bug tracker. Before asking for support, please have a look at the FAQ first.
Comments
Thanks Derick for this great software, the header/cookie interception could be very interesting.
Thanks!
Simply awesome!
Art
Wow, great new stuff! Thanks!
A critical tool in the PHP ecosystem. Thanks for all your work
Hi,
Just wondering how compatible this is with zend studio debugger? As that is what we're currently using within our development office.
It would be very nice to have both xdebug and zend debugger installed alongside each other.
I know you wrote a patch file for it (http://www.suspekt.org/2008/08/04/xdebug-203-stealth-patch/), but that was for version 2.0.3? Would the patch still be applicable to this latest release?
Life Line
Updated a pub
Fix gates
Created 2 gates
Created a waste_basket and a recycling
RE: https://mastodonapp.uk/@Silversnapples/116431673036774230
Please, do make sure to register if you have elections in your area.
New counter flow cycle path on York Bridge
Updated a crossing; Deleted 2 kerbs
Created a waste_basket
Green Woodpecker on the Ground
On one of my walks a few springs ago, I spotted this little chap on the ground moving around.
Spring Colours Along the Thames
It was aovely day for a walk. The spring colours are always so fresh.
Updated 2 benches
I walked 8.6km in 2h36m33s
Updated a bus_stop and a restaurant
I walked 2.0km in 20m06s
I've finished reading This Way Up. It's about maps, that went wrong.
It's a good read, but htyerr were several chapters that were written in a novel way (as a video transcript, a series of letters), and I found distracting from the a tail content. It'll have worked better in a produced video.
No mention of @openstreetmap though :-(
I walked 3.0km in 34m18s
I walked 1.1km in 10m21s
Updated a bench
I walked 4.9km in 56m05s
Created a tree; Updated 3 humps and a waste_basket
I walked 3.0km in 43m29s
The Early Cormorant Catches the Eel
Sorry, not the best photo! But I caught this Cormorant catching this large eel when looking for Bank Swallows, right next to Eel Pie Island in the Thames.
#Birds #BirdPhotography #BirdsOfMastodon #Photography #London
Updated an estate_agent office
I walked 2.2km in 37m51s
I went to my nieces' birthday party yesterday.
The theme was pink, and that included all the food, mostly died with beet root.
Shock and horror this morning when doing number two. Not only was my turd dark red, it was also glittering at me. Apparently the carrot cake had edible glitter...
So now I know what's worse than glitter.
😂 ✨ 💩 🟣





Shortlink
This article has a short URL available: https://drck.me/xdebug-2.1-7x2