View Issue Details

IDProjectCategoryView StatusLast Update
0001475XdebugStacktracespublic2021-03-17 09:29
Reporterderick Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status resolvedResolutionwon't fix 
Product Version2.5.5 
Summary0001475: Add better variable dumping functions
Description

I just discovered your wonderful library, and will make a donation
when I am able. I especially like the var_dump() overload. I grew
tired of the limitations of PHP's variable display functions long ago
and created my own, which I have tweaked over the years. It's pretty
thorough, but I like yours better. A text-output option would be
useful, as sometimes I am viewing the page source while debugging.?

I have another debugging function I've found useful, especially when
dealing with strings containing non-printing characters. It simply
breaks it out, character by character, with ASCII values displayed.
I've attached it so you can see what I mean. It might be useful to
have something like this in Xdebug.

I think something like this is really nice, but I am wondering how this
would easily make it into Xdebug. Right now, when Xdebug dumps variables
it uses the xdebug.collect_params setting, which is mostly meant to show
a value on a single line. Right now, there are already 5 possible
renderings: https://xdebug.org/docs/all_settings#collect_params

From your suggestion, I can already think of a number 6, and perhaps a
number 7 that shows the Unicode Names for characters as well:
https://en.wikipedia.org/wiki/List_of_Unicode_characters. As this is not
a setting you can change per call to var_dump() (it is unfortunately a
variable argument function), it has to be done through an INI
setting—Unless a totally new function is added. I will mull this over,
and if you have good ideas I'm more than happy to hear about them
through https://bugs.xdebug.org


Another feature which would be nice is a shut-up setting. Right now I have a bunch of var_dump() and xdebug_print_function_stack() throughout my code
to see what's going on. I think I have everything worked out, and it would be nice to be able to just tell them all to shut up, without having to go
through and remove them all, in case I still need them. I tried setting xdebug.var_display_max_depth to 0, but that didn't do it.

TagsNo tags attached.
Operating System
PHP Version7.1.0-7.1.4

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-09-25 10:52 derick New Issue
2017-09-25 10:52 derick Status new => assigned
2017-09-25 10:52 derick Assigned To => derick
2019-01-22 21:53 derick Target Version 2.7.0dev =>
2019-01-22 22:28 derick Status assigned => confirmed
2020-03-12 16:23 derick Severity minor => feature
2020-03-12 16:30 derick Category Feature/Change request => Stacktraces
2021-03-17 09:29 derick Status confirmed => resolved
2021-03-17 09:29 derick Resolution open => won't fix