1

I have installed xdebug using brew (brew install php55-xdebug), I can see it loaded in when I print phpinfo(). I walked through stackoverflow and found in the answers that these properties should be set to these values as I did:

HTML_ERRORS are ON html_errors

xdebug.overload_var_dump is ON xdebug.overload_var_dump

xdebug.remote_autostart is ON xdebug.remote_autostart

xdebug.default_enable is ON xdebug.default_enable

And my question is why my var_dump outputs aren't formatted with colors etc.

When I use xdebug_var_dump() it's not colored either.

The only thing I can achieve is this ⬇︎ by adding <pre> tags but can't get those colors working... Thanks

var_dump screen

2
  • That config should work, as far as I know. What happens if you use xdebug_var_dump() instead of var_dump()? Commented Aug 9, 2014 at 13:06
  • When I use xdebug_var_dump() it's not colored either Commented Aug 9, 2014 at 13:10

2 Answers 2

1

Set xdebug.cli_color = 2 to your /etc/php/conf.d/xdebug.ini file. See here:

If this setting is 1, Xdebug will color var_dumps and stack traces output when in CLI mode and when the output is a tty. On Windows, the ANSICON tool needs to be installed.

If the setting is 2, then Xdebug will always color var_dumps and stack trace, no matter whether it's connected to a tty or whether ANSICON is installed. In this case, you might end up seeing escape codes.

Sign up to request clarification or add additional context in comments.

Comments

0

Try setting

xdebug.default_enable = 1 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.