filter · HTML filters
Debug comments (debug)
- Category:
- HTML
- CoreFilters:
- No
- OptimizeForBandwidth:
- No
- Risk:
- Not rated
Annotates the page with HTML comments that say which filters ran and why a resource was or was not rewritten (for example why an image was not inlined or a stylesheet not combined). Enable it per request with ?PageSpeedFilters=+debug while troubleshooting instead of in the configuration: it exposes internals, enlarges every page, and is not meant for production traffic.
When to use it
- Not in CoreFilters: it runs only when you enable it by name.
Risks
The
HTML filters
page lists no specific risks for this filter.
If a page misbehaves with it, DisableFilters debug turns it off for
the scope you set it in.
Configuration
Enable it in the module configuration, at server, virtual-host or location scope:
Apache
ModPagespeedEnableFilters debugnginx
pagespeed EnableFilters debug;IIS (pagespeed.config)
pagespeed EnableFilters debughttps://www.example.com/?PageSpeedFilters=+debug
Scoping, ForbidFilters and the thresholds filters read:
Choosing filters
.
Frequently asked questions
- What does the debug filter do?
- Annotates the page with HTML comments that say which filters ran and why a resource was or was not rewritten (for example why an image was not inlined or a stylesheet not combined). Enable it per request with
?PageSpeedFilters=+debugwhile troubleshooting instead of in the configuration: it exposes internals, enlarges every page, and is not meant for production traffic. - Is debug enabled by default?
- No.
debugis not in CoreFilters, the default RewriteLevel; it runs only when you enable it by name withEnableFilters. - How do I enable debug on Apache and nginx?
- Add
ModPagespeedEnableFilters debugon Apache orpagespeed EnableFilters debug;on nginx. On IIS, addpagespeed EnableFilters debugto pagespeed.config.
Related filters
- add_base_tag — Add base tag
- add_head — Add head
- add_ids — Add IDs
- add_instrumentation — Add instrumentation
- collapse_whitespace — Collapse whitespace
- combine_heads — Combine heads
- compute_statistics — Compute HTML statistics
- convert_meta_tags — Convert meta tags
This page is drawn from the debug entry on HTML filters. Every filter in one table: PageSpeed filters.