All rules

Sheath rule

statamic-no-debug-tags

Statamic dump, dd, and ddd calls must be removed from templates.
Package
Statamic
Category
Blade
Default severity
error by default
Auto-fix
Manual fix

#Why

dump can expose the current render context. dd and its ddd alias dump context and stop the request, which prevents the remainder of the view from rendering.

#Examples

#Bad

{{-- Each call exposes context or stops rendering. --}}
<s:dump:user />
{{ Statamic::tag('ddd') }}
@tags('dump:user')
@antlers
{{ title | dump }}
@endantlers

#Good

{{-- The template renders its intended collection output. --}}
<s:collection:articles>
<h2>{{ $title }}</h2>
</s:collection:articles>

#Notes

The rule checks component tags, executed fluent calls, @tags, embedded Antlers tags, and Antlers modifiers. Fluent builders that are not consumed are skipped.

Only handles that still refer to Statamic's core debug tags and modifiers are reported. Application replacements are not reported.

There is no automatic fix because removing a paired debug tag could also remove authored child content.

#See Also

Related rules validate embedded regions before inspecting their calls: