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

debuber

v0.1.3

Published

Visual debug logger for React/Next.js - floating bubble UI for in-browser debugging

Downloads

199

Readme


Features

  • 🐛 Floating Bubble UI - Inspired by Next.js error overlay
  • 📝 Multiple Log Levels - debug, info, warn, error
  • 🔍 Search & Filter - Quickly find relevant logs
  • 🔒 Production Protection - URL key, keyboard shortcut, or custom function
  • 💾 Persistence - Optionally save logs to localStorage
  • 📋 Copy & Export - Copy logs to clipboard or export as JSON
  • 🎨 Dark Theme - Beautiful dark UI that matches modern dev tools

Installation

npm install debuber
# or
yarn add debuber
# or
pnpm add debuber

Quick Start

1. Add the Provider

// app/layout.tsx (Next.js App Router)
import { DebuberProvider } from 'debuber';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <DebuberProvider
          config={{
            secretKey: 'my-debug-key', // Enable with ?debuber=my-debug-key
            persist: true, // Save logs across refreshes
          }}
        >
          {children}
        </DebuberProvider>
      </body>
    </html>
  );
}

2. Add Logs Anywhere

import { debuber } from 'debuber';

// In any component or function
debuber.log('Simple message');
debuber.info('User logged in', { userId: 123 });
debuber.warn('Cache miss');
debuber.error('API failed', new Error('Network error'));

// Group related logs
debuber.group('Checkout Flow');
debuber.info('Cart loaded');
debuber.info('Payment processed');
debuber.groupEnd();

3. Use the Hook (Optional)

import { useDebuber } from 'debuber';

function DebugControls() {
  const { logs, clear, toggle, isOpen } = useDebuber();

  return (
    <div>
      <p>Total logs: {logs.length}</p>
      <button onClick={clear}>Clear</button>
      <button onClick={toggle}>{isOpen ? 'Close' : 'Open'}</button>
    </div>
  );
}

Configuration

<DebuberProvider
  config={{
    // Protection
    enabled: true,                    // Enable/disable completely
    secretKey: 'your-secret',         // URL param: ?debuber=your-secret
    keyboardShortcut: 'ctrl+shift+d', // Toggle with keyboard
    isEnabled: () => isAdmin,         // Custom check function

    // Behavior
    persist: false,                   // Save to localStorage
    maxLogs: 100,                     // Max logs to keep

    // Appearance
    position: 'bottom-right',         // bottom-right | bottom-left | top-right | top-left
    defaultOpen: false,               // Start with panel open
    bubbleSize: 48,                   // Bubble size in pixels
  }}
>

Production Protection

URL Parameter

Add ?debuber=your-secret to the URL to enable the debugger.

Keyboard Shortcut

Press Ctrl+Shift+D (configurable) to open a password prompt.

localStorage

Set localStorage.setItem('debuber_enabled', 'your-secret') for persistent access.

Custom Function

<DebuberProvider config={{ isEnabled: () => user?.isAdmin }}>

Environment Variable

<DebuberProvider config={{ enabled: process.env.NODE_ENV !== 'production' }}>

API Reference

Logger Methods

| Method | Description | | --------------------------- | ------------------- | | debuber.log(msg, data?) | Log a debug message | | debuber.debug(msg, data?) | Alias for log | | debuber.info(msg, data?) | Log an info message | | debuber.warn(msg, data?) | Log a warning | | debuber.error(msg, data?) | Log an error | | debuber.group(name) | Start a log group | | debuber.groupEnd() | End current group | | debuber.clear() | Clear all logs | | debuber.open() | Open the panel | | debuber.close() | Close the panel | | debuber.toggle() | Toggle the panel |

useDebuber Hook

const {
  logs, // LogEntry[]
  isOpen, // boolean
  isEnabled, // boolean
  filter, // 'all' | 'debug' | 'info' | 'warn' | 'error'
  searchQuery, // string
  clear, // () => void
  toggle, // () => void
  open, // () => void
  close, // () => void
  setFilter, // (filter) => void
  setSearchQuery, // (query) => void
} = useDebuber();

License

MIT