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

@miurajs/miura-debugger

v0.4.8

Published

Miura's developer runtime for diagnostics, overlays, and in-page component layers.

Readme

@miurajs/miura-debugger

Miura's developer runtime for diagnostics, overlays, and in-page component layers.

What It Does

  • collects structured diagnostics across the framework
  • mounts a development overlay for runtime errors and warnings
  • tracks component layers for on-page inspection
  • opens a lightweight component inspector from the in-page layer view
  • records a framework timeline for renders, loads, submits, navigation, and plugin activity
  • keeps internal details like binding:0 available, while showing human-readable labels in the UI

Quick Start

import { enableMiuraDebugger } from '@miurajs/miura-debugger';

enableMiuraDebugger({
  overlay: true,
  layers: true,
  performance: true,
  openOnWarning: false
});

MiuraFramework can also do this centrally in development through static config.debugger, so most apps do not need a separate bootstrap call.

Diagnostics

Use reportDiagnostic() when a framework subsystem wants to emit structured developer-facing context:

reportDiagnostic({
  subsystem: 'render',
  stage: 'binding',
  severity: 'error',
  message: 'Failed to create text expression for post.title',
  bindingLabel: 'text expression for post.title',
  bindingKind: 'text',
  templateFragment: '<h2>${post.title}</h2>'
});

Supported helpers:

  • reportDiagnostic(...)
  • reportError(...)
  • reportWarning(...)
  • getDiagnostics()
  • clearDiagnostics()
  • subscribeDiagnostics(...)
  • reportTimelineEvent(...)
  • getTimelineEvents()
  • clearTimelineEvents()
  • subscribeTimeline(...)

Overlay And Layers

The debugger ships with a built-in <miura-dev-overlay> element. It is mounted automatically when overlay: true.

Layer helpers:

  • registerDebugLayer(...)
  • unregisterDebugLayer(...)
  • getDebugLayers()
  • clearDebugLayers()

These are used by MiuraElement to draw component borders and labels directly in the page when layers: true.

When the overlay and layers are both enabled, clicking a layer opens a simple inspector view with the component label, current snapshot values, render metrics, any registered framework primitives such as resources, forms, or route signals, and the recent timeline events associated with that component. That makes it easier to understand what a component looked like and what it just did, even when there is no active runtime error.

Template Diagnostics

Miura's render and element pipelines report developer warnings for common template mistakes before they become confusing DOM output:

  • function values reaching node text, usually a leaked signal or callback
  • signal-like functions from a second framework copy
  • ambiguous direct property reads with falsy fallback values
  • non-string values passed to trustedHTML()

These diagnostics include internalDetails.code values such as template-function-value, ambiguous-direct-read, and trusted-html-non-string, plus advice shown in the overlay.

Warnings are stored and visible when the overlay is opened, but they do not auto-open the panel by default. Set openOnWarning: true if you want warning diagnostics to interrupt during development.

The overlay includes severity filters, diagnostic code chips, a session-only "mute this code" action, and "copy diagnostic" for pasting the active payload into issues, PRs, or chat threads.

Component-Level Debug Options

Components can refine how they appear in the debugger with either static debug or the @debug(...) decorator:

import { MiuraElement, debug } from '@miurajs/miura-element';

@debug({
  label: 'BlogEditor',
  color: '12, 145, 255',
  showRenderTime: true
})
class BlogEditor extends MiuraElement {
  static debug = {
    report: true,
    layers: true
  };
}

That gives you custom layer labels, per-component opt-outs, and a clear place to grow future debug features without turning the whole app into a global toggle soup.

When using the umbrella @miurajs/miura package, the runtime logger is exported as debugLogger so it does not collide with the component decorator.

Framework Integration

MiuraFramework can enable the debugger centrally from static config in development:

static config = {
  environment: 'development',
  debug: true,
  performance: true,
  debugger: {
    overlay: true,
    layers: true,
    performance: true
  }
};

Keep it disabled in production builds.