phpxdebugxdebug-3

Xdebug 3 collect_params removal from configuration


I recently upgraded our web application from PHP 7.3 to PHP 8.2, and along with it, Xdebug from 2 to 3. One of the changes in Xdebug is to remove the collect_params directive in config. This effectively means collect_params is set to display the maximum amount of information on arguments passed to functions and methods.

This has been extremely disruptive to our development environment because of how the framework we use passes very large objects as arguments. Many errors and warnings create massive amounts of HTML to the point where the browser chugs and freezes while trying to render pages with a single warning, let alone multiple. Similarly, our error logs on the filesystem which store PHP fatal errors are massive and difficult to parse manually.

Is there some way around this I am missing? I would prefer to be able to set collect_params to the max level only when I need to get a peek at the arguments, and have it set to just collecting the type of variable.


Solution

  • There is currently no way around this, but there is an issue in Xdebug's issue tracker to add this back into Xdebug 3.3.