Quick overview
The</> icon in the Symfony Web Profiler toolbar is your entry point to the inspector:
- Green icon — Overlay is on: moving the mouse over the page highlights elements and shows a popup with template names.
- Yellow icon — Overlay is off: the inspector is still enabled (cookie is set), but the overlay is hidden. Click the icon again to make it green.
Step-by-step
1
Enable the inspector
- In the Web Profiler toolbar at the bottom of the page, click the
</>icon. - In the dropdown, check “Enable”.
- The page reloads automatically — the inspector cookie is now set.
2
Show the overlay
After reload, the
</> icon will be yellow (overlay off) or green (overlay on).Click the icon until it turns green. The overlay is now active.3
Hover to see templates
Move the mouse over the page content (not the toolbar).For each element rendered by Twig you will see:
- A blue semi-transparent highlight over the element.
- A popup showing the template name(s), e.g.
demo/_header.html.twig,base.html.twig.
4
Click to open in your IDE
Click the highlighted element or the popup.
- Single template — the browser opens the IDE link and your editor jumps to the file.
- Multiple templates (e.g. nested blocks) — a small picker appears. Click the template you want.
IDE integration requires
framework.ide to be configured. See IDE integration.5
Hide the overlay
Click the
</> icon again. It turns yellow and the overlay disappears.The inspector is still enabled — click the icon again (green) to bring the overlay back without reloading.6
Disable the inspector
Open the dropdown and uncheck “Enable”.The page reloads, the cookie is cleared, and all instrumentation is removed.
Keyboard shortcuts
Filter
The Filter field in the dropdown limits which blocks are highlighted:- Empty — All blocks are shown (default).
- One term — Only blocks whose template name or path contains that text (case-insensitive), e.g.
headerortemplates/demo. - Several terms — Separate with commas for OR logic, e.g.
header, footer, instructions.
Web Profiler full panel
Click “View full panel →” in the dropdown (or open the Twig Inspector section in the Symfony Profiler) to access the full panel. It has five tabs:Controller HTML comments
When the inspector is enabled, the HTML source includes machine-readable controller comments:- One comment is injected immediately after
<body>to identify the main controller. - Start and end comments wrap each fragment controller’s output, identifying which controller rendered which section.
