debug

Debug logging utility with namespace-based filtering across desktop, server, and client environments. Follows strict namespace conventions (e.g., lobe-server:[module] , lobe-desktop:[module] ) to organize logs by platform and module Supports format specifiers including %O for expanded objects, %s for strings, and %d for numbers Enable output via localStorage.debug in browsers, DEBUG environment variable in Node.js, or process.env.DEBUG in Electron Wildcard filtering (e.g., lobe-* ) allows selective log visibility across the entire codebase

INSTALLATION
npx skills add https://github.com/lobehub/lobehub --skill debug
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2a

  • Desktop: lobe-desktop:[module]
  • Server: lobe-server:[module]
  • Client: lobe-client:[module]
  • Router: lobe-[type]-router:[module]

Format Specifiers

  • %O - Object expanded (recommended for complex objects)
  • %o - Object
  • %s - String
  • %d - Number

Enable Debug Output

Browser

localStorage.debug = 'lobe-*';

Node.js

DEBUG=lobe-* npm run dev

DEBUG=lobe-* pnpm dev

Electron

process.env.DEBUG = 'lobe-*';

Example

// src/server/routers/edge/market/index.ts

import debug from 'debug';

const log = debug('lobe-edge-router:market');

log('getAgent input: %O', input);
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card