npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shopify-debugger

v0.1.2

Published

Local debugger and shim for Shopify Polaris App Bridge APIs.

Readme

Shopify Debugger

Local debugger and shim for Shopify Polaris App Bridge APIs.

This package lets a Shopify embedded app keep calling the normal App Bridge API during local development:

import { useAppBridge } from "@shopify/app-bridge-react";

const shopify = useAppBridge();

shopify.modal.show("delete-modal");
shopify.toast.show("Saved");
const products = await shopify.resourcePicker({ type: "product" });

When debugger mode is enabled, @shopify/app-bridge-react is aliased to this package's local shim. Your app code does not need to change.

Install

bun add -d shopify-debugger

Vite setup

// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { shopifyDebugger } from "shopify-debugger/vite";

export default defineConfig({
  plugins: [react(), shopifyDebugger()],
});

Run local dev with debugger mode:

SHOPIFY_DEBUGGER=true bun run dev

SHOPIFY_APP_BRIDGE_DEBUG=true also works.

When enabled, the Vite plugin also registers a local debugger shell at:

http://localhost:5173/_debugger

Open that route to load your app inside a lightweight iframe host. This gives you a local Shopify-like debugging surface without going through admin.shopify.com.

You can customize the route or the iframe URL:

shopifyDebugger({
  debuggerRoute: "/_debugger",
  appUrl: "/?shop=debug-store.myshopify.com&embedded=1",
});

Set debuggerRoute: false to disable the route while keeping the App Bridge alias.

Debug panel

You do not need to add a debug panel to the client app. The primary flow is zero client-code changes: open /_debugger and use the shell panel there.

The exported <ShopifyDebuggerPanel /> still exists as an optional escape hatch for apps that cannot use the iframe shell route.

Release

This package uses changelogen for changelog and release automation.

Dry-run release notes:

bun run release:dry

Build, update changelog, tag, and push:

bun run release

Build, update changelog, tag, push, and publish to npm:

bun run release:publish

Example

This repo includes a runnable example app:

cd example
bun install
bun run dev

Then open:

http://127.0.0.1:5173/_debugger

The example imports useAppBridge from @shopify/app-bridge-react normally. Only its Vite config uses shopifyDebugger().

What is supported?

Initial shim support:

  • useAppBridge() from @shopify/app-bridge-react
  • shopify.modal.show(id)
  • shopify.modal.hide(id)
  • shopify.modal.toggle(id)
  • shopify.toast.show(message, options?)
  • shopify.resourcePicker(options)
  • shopify.loading.show() / shopify.loading.hide()
  • shopify.saveBar.show(id) / shopify.saveBar.hide(id)
  • shopify.navigation.navigate(destination)

The /_debugger shell shows a local event timeline and lets you switch resource picker behavior between:

  • success
  • cancel
  • error
  • manual

Manual resource picker flow

When resource picker mode is manual, calls to shopify.resourcePicker(...) stay pending until you resolve, cancel, or reject them from the /_debugger shell.

Modal fallback

When shopify.modal.show('my-modal') is called, the debugger tries to find document.getElementById('my-modal') and adds open plus data-shopify-debugger-open="true".

A small CSS fallback is included for ui-modal[data-shopify-debugger-open="true"] so App Bridge modal content is visible locally.

Programmatic control

import { shopifyDebugger } from "shopify-debugger";

shopifyDebugger.__debug.setResourcePickerMode("cancel");
shopifyDebugger.__debug.setResourcePickerResponse([
  {
    id: "gid://shopify/Product/123",
    title: "Custom debug product",
  },
]);

Important caveat

This package mimics the public App Bridge API shape for local debugging. It does not emulate Shopify Admin, OAuth, billing, permissions, or the real Admin iframe host protocol.