Patterndex – Pattern & Block Debugger Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
A developer tool that adds two debugging surfaces to the block editor (post editor and site editor). Nothing is loaded on the front end, and nothing is loaded for users without the edit_posts capability.
Pattern browser
A pinnable Patterndex sidebar listing every pattern the editor knows about:
- Registered patterns from the client stores (core, theme, plugin, pattern directory), plus user patterns (
wp_blockposts) with their sync status. - Search, plus source and category filters.
- Per pattern: metadata (source, categories, block types, sync status, inserter visibility), a recursive block-usage count, copy name or content, a JSON dump, and a live preview.
- A Server registry section backed by a REST endpoint that dumps the raw server-side
WP_Block_Patterns_Registryand category registry, including patterns hidden from the inserter, exactly as PHP registered them.
Block debug panel
A Debug panel in the block inspector for the selected block, and the same panel as Selected block at the top of the sidebar. The sidebar copy matters: the block inspector renders no panels at all for synced pattern instances (core/block), so the sidebar is the only place they can be debugged.
- Overview (name, client ID) with copy actions.
- Dumps: block instance, block type, the wrapper element’s rendered DOM attributes, serialized block HTML.
- Attributes editor: the block’s attributes as raw, validated JSON. Apply or reset; deleting a key removes the attribute; keys outside the block type’s attribute schema are flagged but allowed.
- Pattern provenance: shows when the selected block is a synced pattern instance (
core/blockref,wp_blockrecord, per-instance overrides) or was inserted from a pattern (metadata.patternName), with dumps of the source pattern.
Access control
Every debug surface (editor assets and the REST endpoint) requires the view_patterndex capability, mapped to edit_posts by default. Remap it by filtering map_meta_cap at a priority above 0:
add_filter( 'map_meta_cap', function ( $caps, $cap ) {
if ( 'view_patterndex' === $cap ) {
$caps = [ 'manage_options' ];
}
return $caps;
}, 10, 2 );
Source code
The editor script is built from TypeScript with @wordpress/scripts. The source is included in this plugin under entries/, and the full project with build tooling is at github.com/danlapteacru/patterndex. To rebuild: npm install && npm run build.
Screenshots
Debug panel in the block inspector: overview, dumps, serialized HTML and the raw JSON attributes editor.
Dump modal with a pretty-printed, copyable block instance.
Pattern browser with search, filters, metadata, block counts and live previews.
Selected block panel showing synced pattern provenance for a
core/blockinstance.
Server registry dump, including patterns hidden from the inserter.

