Discussion:
Feature Request for XDebug to turn OFF color in var_dump()
Daevid Vincent
2014-01-29 22:14:21 UTC
Permalink
Derick,

I love XDebug.

However one thing that is problematic is that there doesn't seem to be a way
to turn off the special color and formatting. There is only a way to force
it enabled on a CLI via xdebug.cli_color. That's the opposite of what I
want.

For example, I am debugging some AJAX using Firefox and Firebug. I make the
request and using that tool I can view the returned "Response". However it
is all difficult to read: <pre class='xdebug-var-dump' dir='ltr'> <b>object</b>(<i>Join</i>)[<i>3</i>] <i>public</i> 'username' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'asdfasdf5'</font> <i>(length=9)</i> <i>public</i> 'password' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'testtest'</font> <i>(length=8)</i> <i>public</i> 'email' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'***@example.net'</font> <i>(length=16)</i> <i>public</i> 'customer_lname' <font color='#888a85'>=&gt;</font> <font
color='#3465a4'>null</font> <i>public</i> 'customer_fname' <font color='#888a85'>=&gt;</font> <font
color='#3465a4'>null</font> <i>public</i> 'customer_address' <font color='#888a85'>=&gt;</font> <font
color='#3465a4'>null</font>

I just want the nice plain version without all the HTML markup in there.

Ideally it would be a second parameter rather than a ini_set() option (or do
both!)

var_dump($myvar, NO_COLOR); or something like that.

Thanks,

Daevid Vincent
http://daevid.com
425.985.1752 cell PST
Stefano D. Mtangoo
2014-01-30 06:07:33 UTC
Permalink
Post by Daevid Vincent
I just want the nice plain version without all the HTML markup in there.
If you mean in firebug, click the HTML next to response and that is it
(HTML version of response)
Post by Daevid Vincent
Ideally it would be a second parameter rather than a ini_set() option
(or do both!)
var_dump($myvar, NO_COLOR); or something like that.
Thanks,
Daevid Vincent
http://daevid.com
425.985.1752 cell PST
--
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. http://hosannahighertech.co.tz
Linkedin: http://www.linkedin.com/pub/stefano-mtangoo/45/644/281
/The purpose of man is to know his Maker Be known by his Maker
And make his Maker known So that others may know his Maker as their
Maker(Emeal Zwayne) /
Jens-André Koch
2014-01-30 14:23:54 UTC
Permalink
Hey Daevid,

you are viewing the raw reponse content in the "Response" tab,
but you might view the reponse content as properly formatted HTML in the
"HTML" tab.
It's not without colors, but easy to read.

Regards, Jens
Post by Daevid Vincent
Derick,
I love XDebug.
However one thing that is problematic is that there doesn't seem to be
a way to turn off the special color and formatting. There is only a
way to force it enabled on a CLI via xdebug.cli_color. That's the
opposite of what I want.
For example, I am debugging some AJAX using Firefox and Firebug. I
make the request and using that tool I can view the returned
<small>string</small> <font
<font color='#3465a4'>null</font>
I just want the nice plain version without all the HTML markup in there.
Ideally it would be a second parameter rather than a ini_set() option
(or do both!)
var_dump($myvar, NO_COLOR); or something like that.
Thanks,
Daevid Vincent
http://daevid.com
425.985.1752 cell PST
Derick Rethans
2014-02-03 12:45:36 UTC
Permalink
Post by Daevid Vincent
color='#3465a4'>null</font>
I just want the nice plain version without all the HTML markup in there.
Turn off xdebug.overload_vardump in php.ini then, or html_errors if you
must.
Post by Daevid Vincent
Ideally it would be a second parameter rather than a ini_set() option
(or do both!)
var_dump($myvar, NO_COLOR); or something like that.
That's not possible, as var_dump accepts a variable number of arguments
to dump.

cheers,
Derick
--
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
Xdebug | http://xdebug.org | xdebug-***@lists.xdebug.org
twitter: @derickr and @xdebug
Loading...