View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000706||Xdebug||Usage problems (Wrong Results)||public||2011-08-02 11:50||2019-07-11 12:43|
|Reporter||Sander Marechal||Assigned To||derick|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0000706: var_dump not overloaded in CLI when html_errors is off|
|Description||When the PHP setting `html_errors` is off (which it usually is in a CLI environment), then var_dump will not be overloaded by xdebug, even when xdebug.overload_var_dump is on.|
|Steps To Reproduce||Turn off `html_errors`, then do a var_dump from a CLI script.|
|Tags||No tags attached.|
I know it doesn't overload it for the command line, because it makes no sense to show HTML if HTML can not be rendered (ie, if html_errors is off).
In Xdebug 2.2 var_dump is already overloaded on the CLI if you set xdebug.cli_color=1 so all the xdebug.var_display_max_* settings will work (and you get a coloured output!).
Let me know if you meant something else.
Why is var_dump overloading dependent on the `html_errors` and `xdebug.cli_color` setting at all? If I understand you correctly (please tell me if I'm wrong), var_dump would still not be overloaded in the CLI if both these settings are off. A possible use-case for that is if I want to capture the xdebug's var_dump output on the CLI and post-process it in some way. In that case I don't want CLI colors.
I do this with Phing for example. I have added a couple of debug flags to my Phing build script that var_dumps various objects. Phing captures these in build properties which are used (or echoed) elsewhere in the build script.
I think ideally, var_dump overloading (and usage of the `xdebug.var_display_max_*` setting) should only depend on `xdebug.overload_var_dump`. `html_errors` and `xdebug.cli_color` should only determine how the output is rendered, not whether overloading is used.
I think that would be much more useful. With all the new heavily object-oriented PHP 5.3 frameworks (like Symfony 2, Doctrine 2, Lithium, etcetera) PHP's regular var_dump is quickly becoming useless because it just dumps in infinite recursion. If fact, I even have XDebug enabled on my production server just so I can use the `xdebug.var_display_max_*` settings.
||Duplicate of 0000457, which is implemented for Xdebug 2.2.0 already.|
|2011-08-02 11:50||Sander Marechal||New Issue|
|2011-08-02 12:01||derick||Note Added: 0001768|
|2011-08-02 12:01||derick||Status||new => resolved|
|2011-08-02 12:01||derick||Resolution||open => no change required|
|2011-08-02 12:01||derick||Assigned To||=> derick|
|2011-08-11 05:29||Sander Marechal||Note Added: 0001774|
|2011-08-11 05:29||Sander Marechal||Status||resolved => feedback|
|2011-08-11 05:29||Sander Marechal||Resolution||no change required => reopened|
|2014-02-27 19:11||derick||Note Added: 0002687|
|2014-02-27 19:11||derick||Relationship added||duplicate of 0000457|
|2014-02-27 19:11||derick||Status||feedback => resolved|
|2014-02-27 19:11||derick||Resolution||reopened => fixed|
|2016-07-31 12:36||derick||Category||Usage problems => Usage problems (Crashes)|
|2016-07-31 12:38||derick||Category||Usage problems (Crashes) => Usage problems (Wrong Results)|
||File Added: 130.pdf|
|2019-07-11 19:33||derick||File Deleted: 130.pdf|