Web Profiler not showing up in dev Web Profiler not showing up in dev php php

Web Profiler not showing up in dev


The profiler toolbar needs <body> ... </body>. I guess you don't have it in your twig file(s).

Profiler

# app/config/config_dev.ymlweb_profiler:    toolbar: true    intercept_redirects: false

Example twig file.

The line {% extends '::base.html.twig' %} will extend app/Resources/views/base.html.twig which injects default <body>...</body> into your custom twig files.

{% extends '::base.html.twig' %}{% block body %}   Hello!{% endblock %}


In case your action not returning html code (e.g json API) and you want to use profiler:

Quick and dirty solution:

return new Response("<html><body>Debug data</body></html>");

Even quicker and dirtier solution - returning non Response type in controller will raise exception with profiler enabled response:

return 1;

If your application is running by Symfony >=2.4 you can also use X-Debug-Token which contains debug token and X-Debug-Token-Link header which contains link to profiler page. If you want to use this method Chrome extension Symfony2 Profiler shortcut will increase your user experience.


have you enabled it in the config.yml or parameters.yml file? Are you in dev mode ? calling app_dev.php ?

also, it sometimes is minismised to a tidy square in the bottom right of the browser.

just some ideas that may help