Skip to content

Debugging widgets with pl_debug

The storefront widgets stay silent by default - no console output for shoppers. To see what they’re doing, add ?pl_debug=1 to any storefront URL and open the browser console:

https://your-store.com/products/backpack-black?pl_debug=1
https://your-store.com/collections/all?pl_debug=1

The widgets then log what they load, what they detect on the page, and where they decide to place swatches. It’s the quickest way to answer “why aren’t swatches showing here?” on a custom theme.

Each widget logs under its own prefix, so you can tell which one a message came from:

PrefixWidget
[pl-product-swatches]Product group swatches on product pages
[pl-collection-groups]Product group swatches on collection cards
[pl-collection-variants]Variant swatches on collection cards
[pl-variant-swatches]Variant swatches on product pages
[pl-bundle-swatches]Bundle app integration

On collection pages, add ?pl_debug_details=1 for a verbose trace of the card-detection algorithm - how the widget finds each product card and picks the element to place swatches next to. Useful when swatches land in the wrong spot on a custom theme.