Debug Window — Templates tab
The easiest way to inspect template behavior is the Templates tab in the Debug Window. It shows template-if results and lets you inspect any element for its template bindings and child tree.Open the Debug Window with Ctrl + Shift + F12 (Windows/Linux) or Command + Shift + F12 (Mac) on an ElasticFunnels page, then click the Templates tab.
Events (New vs Previous)
The Events section shows:
Each template-if event shows:
- The condition (or “(else)”) and the result (e.g.
true,false, branch index). - (unchanged) when the engine skipped re-rendering because the selected branch was the same.
- A template-if branch never shows — check which condition is chosen and the result.
- You want to see whether template-if runs are being skipped (unchanged) after an action.
Inspect element (Pick element)
Inspect element lets you click a node on the page and see its template bindings and child tree.- Click Pick element.
- Click any element on the page (outside the debug window).
- The panel shows:
- Template bindings on that node: data-condition, data-each, ef-text/data-ef-text, ef-value/data-ef-value/data-template-value, ef-src/ef-href/…, data-ef-var-path, data-ef-var-template, data-ef-cloak, data-ef-debug-if-condition, data-ef-debug-if-result, and event bindings (@click, data-ef-on:click, etc.).
- A tree of child nodes (tag, id, classes, and any template attributes).
Console debug flags
The template processor (templateProcessor.js) also supports console-only debug flags. When set, it logs to the browser console with a[ef-template] prefix. These are independent of the Debug Window.
1. efTemplateDebug
Enables general template debug logs (e.g. directive runs, condition evaluation, var updates).
How to enable:
- URL: Add
?efTemplateDebugto the page URL (e.g.https://yoursite.com/checkout?efTemplateDebug). - Session storage: In the console or a script:
Reload. To disable:
sessionStorage.removeItem('efTemplateDebug');
2. efTemplateTraceContext
Enables stack traces when getEffectiveContext is called (throttled to avoid flooding).
How to enable: Add ?efTemplateTraceContext to the URL or set sessionStorage.setItem('efTemplateTraceContext', '1'); and reload.
Use this when you need to see the call stack for context resolution.
Inspecting scope
Read window.efScope
In the browser console:
After an update
After something that should update the UI:- Confirm efScope has the new data.
- If the UI did not update, verify the expected efScope path actually changed and that your template expressions reference that path (or a parent path).
Verifying updates
Manual trigger
To force a full re-run of the template engine (e.g. after editing efScope in the console):Path-scoped update
If you know the exact scope path that changed (e.g. checkout.shipping_same_as_billing):Common issues
Summary
- Debug Window → Templates tab — Events (New/Previous) show template-if results and errors; Pick element shows bindings and tree for any node. Refreshes on scope update. No URL flag needed when the tab is open.
- Console flags — efTemplateDebug (URL or sessionStorage) for
[ef-template]logs; efTemplateTraceContext for getEffectiveContext stack traces. - Inspect window.efScope before and after actions to confirm data.
- Optionally trigger notifyScopeUpdated() or notifyScopePathsUpdated([path]) manually during troubleshooting.