Debug package

From lobehub/lobehub · View interactive version

Debug package is an AI agent skill from the GitHub repository lobehub/lobehub. Use for debug() logging, lobe-* namespaces, DEBUG/localStorage.debug configuration and log formatting.

How to use this skill

Skill file

Debug Package Usage Guide

Basic Usage

import debug from 'debug';

// Format: lobe-[module]:[submodule]
const log = debug('lobe-server:market');

log('Simple message');
log('With variable: %O', object);
log('Formatted number: %d', number);

Namespace Conventions

Format Specifiers

Enable Debug Output

Browser

localStorage.debug = 'lobe-*';

Node.js

DEBUG=lobe-* bun run dev
DEBUG=lobe-* pnpm dev

Electron

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

Example

// apps/server/src/routers/lambda/agentEval.ts
import debug from 'debug';

const log = debug('lobe-lambda-router:agent-eval');

log('getAgent input: %O', input);
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.