Patterns Debug
Pattern registry browser and block/pattern debug panel for the WordPress block editor
by Dan Lapteacru · github.com/danlapteacru/wp-patterns-debug · website
★ 0stars
2composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/danlapteacru/wp-patterns-debug/archive/refs/heads/main.zipAlso on Packagist as danlapteacru/wp-patterns-debug:
composer require danlapteacru/wp-patterns-debugFrom the readme
Patterns Debug
Adds two debugging surfaces to the WordPress block editor (post editor and site editor):
Pattern browser
A pinnable Patterns Debug sidebar with a Selected block debug panel on top, followed by a browser listing every pattern the editor knows about:
- Registered patterns from the client stores (core, theme, plugin, pattern directory), plus user patterns (wpblock 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/content, a JSON dump, and a live BlockPreview.
- A Server registry section backed by a REST endpoint (wp-patterns-debug/v1/registry) that dumps the raw server-side WPBlockPatternsRegistry 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 in the plugin 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.
- Overvi