Question

someone told me to install xdebug so that i can get colored output with var_dump for php.

I installed xdebug from here and edited the ini file

http://xdebug.org/docs/install

The output of php -m

wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
Xdebug

But still my var_dump ouput is not colored

Do i need to do something else as well in firefox

No correct solution

OTHER TIPS

You don't have to do anything on any browser since xdebug is working on the server. Although, you have to be sure that you have set things right.

In your php.ini, be sure that html_errors is on.

Below is my xdebug configuration, so you can compare things. But my system may not have the same structure as yours, so check where do you have your zend_extension. I have this configuration in a file called xdebug.ini on /etc/php/apache2-php5/ext/ . You may have the configuration on a separate file, like this, or you can add it to your php.ini, doesn't matter.

zend_extension=/usr/lib64/php5.5/lib/extensions/no-debug-zts-20121212/xdebug.so
xdebug.auto_trace="1"
xdebug.trace_output_dir="/var/log/xdebug"
xdebug.trace_output_name="trace.%s_%t"
xdebug.trace_format="0"
xdebug.trace_options="1"
xdebug.collect_assignments="1"
xdebug.collect_includes="1"
xdebug.collect_params="4"
xdebug.collect_return="0"
xdebug.collect_vars="1"
xdebug.default_enable="1"
xdebug.extended_info="1"
xdebug.manual_url="http://www.php.net"
xdebug.max_nesting_level="100"
xdebug.show_exception_trace="0"
xdebug.show_local_vars="1"
xdebug.show_mem_delta="1"
xdebug.dump.COOKIE=false
xdebug.dump.ENV=false
xdebug.dump.FILES=false
xdebug.dump.GET="NULL"
xdebug.dump.POST="NULL"
xdebug.dump.REQUEST="NULL"
xdebug.dump.SERVER="NULL"
xdebug.dump.SESSION="NULL"
xdebug.dump_globals="1"
xdebug.dump_once="1"
xdebug.dump_undefined="1"
xdebug.pror_enable="0"
xdebug.profiler_enable="1"
xdebug.profiler_output_dir="/var/log/xdebug"
xdebug.profiler_output_name="%s_%t"
xdebug.profiler_enable_trigger="0"
xdebug.profiler_append="0"
xdebug.profiler_aggregate="0"
xdebug.remote_enable="On"
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_mode="req"
xdebug.remote_port="9000"
xdebug.remote_autostart="0"
xdebug.remote_log=""
xdebug.idekey=""
xdebug.var_display_max_data="16384"
xdebug.var_display_max_depth="10"
xdebug.var_display_max_children="512"
xdebug.max_nesting_level="100"
xdebug.overload_var_dump="1"
xdebug.scream="1"
xdebug.cli_color="1"
xdebug.coverage_enable="1"

Of course, remember to restart apache after doing changes on xdebug.ini or php.ini

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top