Deactivate the profiler (debug bar) at the same time as the debug mode with Symfony
Published on 2023-01-02 • Modified on 2023-01-02
This snippet shows how to deactivate the profiler (debug bar) simultaneously wit the debug mode with Symfony. We can use this little trick and use the %kernel.debug%
parameter instead of putting a boolean: this avoids managing an additional parameter for that. Indeed, it seems weird to display the profiler while having the debug mode disabled.
# config/packages/dev/web_profiler.yaml
web_profiler:
toolbar: '%kernel.debug%'
intercept_redirects: false
More on Stackoverflow Read the doc Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉