debug

Implement debug logging with namespaces and format specifiers across browser, Node.js, and Electron.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and implement debugging within the application by providing clear guidelines on logging, namespace conventions, and enabling debug output across different environments.

Core Features & Use Cases

  • Logging Implementation: Demonstrates how to use the debug library for logging messages and variables.
  • Namespace Conventions: Outlines standard naming conventions for different parts of the application (Desktop, Server, Client, Router).
  • Format Specifiers: Explains how to format log output for various data types.
  • Enabling Debug Output: Provides instructions for activating debug logs in Browser, Node.js, and Electron environments.
  • Use Case: When encountering unexpected behavior in the server, use this Skill to add detailed logging to pinpoint the exact module and issue.

Quick Start

Use the debug skill to log a simple message with the namespace 'lobe-server:market'.

Frequently Asked Questions about debug

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

FAQPage Schema
How do I implement debug logging in a Node.js application?

To implement debug logging in a Node.js application, use the `debug` library to log messages and variables. You establish namespace conventions for different modules and enable the debug output environment variable to activate troubleshooting logs.

What namespace conventions should I use for client and server logging?

Namespace conventions for logging separate modules by prefix, such as using 'lobe-server' for the server and 'lobe-client' for the client. This standardizes log identification across Desktop, Server, Client, and Router application segments during troubleshooting.

Can I enable debug output in both browser and Electron environments?

Yes, you can enable debug output across browser, Node.js, and Electron environments. The debug library supports activating logs in all these platforms to ensure effective troubleshooting throughout your entire application stack.

How do I format log output for different data types during troubleshooting?

To format log output for different data types during troubleshooting, use format specifiers provided by the debug library. This allows you to append formatted variables directly to your log messages for clearer application state analysis.

Why use namespaces for application troubleshooting instead of standard console logs?

Using namespaces for application troubleshooting isolates log output to specific modules like the server or client. Unlike standard console logs, this selectively enables targeted debug output, reducing noise and pinpointing exact issues across environments.