Basic information
About debug
Debug package usage guide. Use when adding debug logging, understanding log namespaces, or implementing debugging features. Triggers on debug logging requests or logging implementation.
debug is an agent skill listed in the AddMCP.net directory, published by lobehub. Runtime: TypeScript. The repository has 83,522 GitHub stars. Source code is hosted on github.com. Related topics: agent, agent-collaboration, agent-harness, ai, cao.
Overview
What is debug?
name: debug description: Debug package usage guide. Use when adding debug logging, understanding log namespaces, or implementing debugging features. Triggers on debug logging requests or logging implementation. user-invocable: false
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
- 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);Videos
Tutorials, guides, and showcases related to debug. The player loads when you press play.
Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In