Title: Patterndex – Pattern &amp; Block Debugger
Author: Dan Lapteacru
Published: <strong>November 12, 2026</strong>
Last modified: November 12, 2026

---

Search plugins

![](https://ps.w.org/patterndex/assets/banner-772x250.png?rev=3797910)

![](https://ps.w.org/patterndex/assets/icon-256x256.png?rev=3797910)

# Patterndex – Pattern & Block Debugger

 By [Dan Lapteacru](https://profiles.wordpress.org/d1sabled/)

[Download](https://downloads.wordpress.org/plugin/patterndex.0.1.2.zip)

 * [Details](https://wordpress.org/plugins/patterndex/#description)
 * [Reviews](https://wordpress.org/plugins/patterndex/#reviews)
 *  [Installation](https://wordpress.org/plugins/patterndex/#installation)
 * [Development](https://wordpress.org/plugins/patterndex/#developers)

 [Support](https://wordpress.org/support/plugin/patterndex/)

## 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_block` posts) 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_Registry` and 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/block` ref, `wp_block` record, 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](https://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.⌉⌊Debug panel in the block inspector: overview, dumps, serialized
HTML and the raw JSON attributes editor.⌉[

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.⌉⌊Dump modal with a 
pretty-printed, copyable block instance.⌉[

Dump modal with a pretty-printed, copyable block instance.

[⌊Pattern browser with search, filters, metadata, block counts and live previews.⌉⌊
Pattern browser with search, filters, metadata, block counts and live previews.⌉[

Pattern browser with search, filters, metadata, block counts and live previews.

[⌊Selected block panel showing synced pattern provenance for a core/block instance.⌉⌊
Selected block panel showing synced pattern provenance for a core/block instance
.⌉[

Selected block panel showing synced pattern provenance for a `core/block` instance.

[⌊Server registry dump, including patterns hidden from the inserter.⌉⌊Server registry
dump, including patterns hidden from the inserter.⌉[

Server registry dump, including patterns hidden from the inserter.

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/` or install it from the Plugins
    screen.
 2. Activate it.
 3. Open any post or template in the block editor. The _Patterndex_ sidebar is in the
    editor’s plugins menu (the puzzle-piece icon), and the _Debug_ panel appears in
    the block inspector when a block is selected.

No settings page. Deactivate the plugin to remove everything; it stores no options.

## FAQ

### Does this affect the front end of my site?

No. Assets are only enqueued in the block editor, and only for users with the required
capability.

### Who can see the debug tools?

By default anyone who can edit posts. Filter `map_meta_cap` for the `view_patterndex`
capability to restrict it further, for example to administrators only.

### Why is there a separate sidebar as well as the inspector panel?

Because the block inspector shows nothing for synced pattern instances (`core/block`).
The sidebar’s _Selected block_ panel works for every block, including those.

### What does the REST endpoint expose?

patterndex/v1/registry returns the server-side pattern and category registries. 
It is read-only and requires the same capability as the editor UI.

### Does it store any data?

No options, no post meta, no transients. Uninstalling leaves nothing behind.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Patterndex – Pattern & Block Debugger” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Dan Lapteacru ](https://profiles.wordpress.org/d1sabled/)

[Translate “Patterndex – Pattern & Block Debugger” into your language.](https://translate.wordpress.org/projects/wp-plugins/patterndex)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/patterndex/), check
out the [SVN repository](https://plugins.svn.wordpress.org/patterndex/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/patterndex/) by 
[RSS](https://plugins.trac.wordpress.org/log/patterndex/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.1.2

 * Initial release on WordPress.org.

## Meta

 *  Version **0.1.2**
 *  Last updated **6 days ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.6 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 8.1 or higher **
 * Tags
 * [block-editor](https://wordpress.org/plugins/tags/block-editor/)[debug](https://wordpress.org/plugins/tags/debug/)
   [developer](https://wordpress.org/plugins/tags/developer/)[gutenberg](https://wordpress.org/plugins/tags/gutenberg/)
   [patterns](https://wordpress.org/plugins/tags/patterns/)
 *  [Advanced View](https://wordpress.org/plugins/patterndex/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/patterndex/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/patterndex/reviews/)

## Contributors

 *   [ Dan Lapteacru ](https://profiles.wordpress.org/d1sabled/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/patterndex/)