Disable xdebug html errors & colored output using ini_set()

To disable xdebug's colorized html output, use the following ini_set().

ini_set('xdebug.default_enable', false);
ini_set('html_errors', false);

This removes the html tags including the pre tag with a "xdebug-var-dump" class when using var_dump():

<pre class='xdebug-var-dump' dir='ltr'>
This post is available on GitHub.
Posted .

1 comment

  1. anonymous

    This is exactly what I needed! Thanks a ton!!

Leave a Reply