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

One thought on “QuickTip: Turn symfony's web profiler debug bar on or off”

  1. To be exact, “$this->container->get(‘profiler’)->disable();“ will not disable only the toolbar but the whole profiler. So it is not only hiding the toolbar. It also prevents collecting the data (which can be accessed using the search in the web profiler even when you don’t have the toolbar).

    Disabling the profiler itself is done in the FrameworkBundle configuration (WebProfilerBundle is only about the profile UI, not about the profiling itself):

    framework:
    profiler:
    collect: false

Leave a Reply

Your email address will not be published. Required fields are marked *