debug

Instrument runtime logging with namespaced debug loggers and format specifiers.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/razgulay/my-lobe-chat --skill debug-razgulay
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/razgulay/my-lobe-chat/tree/main/.agents/skills/debug
Command: npx skills add https://github.com/razgulay/my-lobe-chat --skill debug-razgulay

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a practical guide to implementing and understanding debug logging, helping developers quickly surface useful runtime information during development and troubleshooting.

Core Features & Use Cases

  • Namespace-based logging: organized loggers per module (e.g., lobe-server:market) for clear, scannable output.
  • Format-aware logging: supports standard placeholders (%O, %o, %s, %d) to display objects and values cleanly.
  • Environment-friendly toggling: enables or disables logging across environments (Browser, Node.js, Electron) via environment variables or localStorage.
  • Use Case: quickly diagnose a failing route by enabling a logger for the affected module and reviewing structured output.

Quick Start

Import the debug package, create a logger with a namespaced key, and emit messages to verify behavior in your current environment.

Frequently Asked Questions about debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable namespaced debug logging in Node.js?

Toggle debug logging in browser environments by configuring localStorage keys. The debug package supports environment-friendly output toggling across browser, Node.js, and Electron contexts.

What format specifiers does the debug package support for object inspection?

The debug package supports standard format specifiers including %O, %o, %s, and %d to display objects and values cleanly. This format-aware logging ensures scannable, structured output during diagnostics.

Does debug logging work in both server and client contexts?

Debug logging works across server, client, and desktop contexts. It requires creating namespaced loggers and toggling output via environment variables or browser storage to diagnose failing routes effectively.

How do I organize runtime logs to diagnose a failing route?

Organize runtime logs using namespace-based logging with keys like lobe-server:market for each module. This structured approach helps you quickly surface useful information and review output for failing routes.