QuickTip: Turn symfony's web profiler debug bar on or off

Check out your config_dev.yml and you will notice a special section over there

[sourcecode language=”shell”]
web_profiler:
toolbar: true
intercept_redirects: false
[/sourcecode]

You can turn the debug bar on or off anytime by changing the value of toolbar in this web_profiler section.

If you want to turn debug bar off for a specific controller action, you can do so by the following line. This will actually stop the profiler for the current action.

[sourcecode language=”php”]
$this->container->get(‘profiler’)->disable();
[/sourcecode]

Enjoy!