{"data":{"slug":"github-lobehub-lobehub-agents-skills-debug-package-34d9586dcd3a","title":"Debug Package Logging for Lobe Framework","summary":"Configure and use debug logging in Lobe framework applications for debugging modules like server, client, and router. The deliverable is formatted log output for specific modules, such as 'lobe-server:market' or 'lobe-router:module'.","url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-debug-package-34d9586dcd3a","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-lobehub-lobehub-agents-skills-debug-package-34d9586dcd3a","markdown_url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-debug-package-34d9586dcd3a.md","download_url":"https:\/\/skillshunter.net\/skills\/github-lobehub-lobehub-agents-skills-debug-package-34d9586dcd3a\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the environment is set up with the debug package installed. For browser environments, set `localStorage.debug = 'lobe-*'` to enable logging. In Node.js, use `DEBUG=lobe-*` with your development command. In Electron, set `process.env.DEBUG = 'lobe-*'` before running the application.","instructions":"---\nname: debug-package\ndescription: 'Use for debug() logging, lobe-* namespaces, DEBUG\/localStorage.debug configuration and log formatting.'\nuser-invocable: false\n---\n\n# Debug Package Usage Guide\n\n## Basic Usage\n\n```typescript\nimport debug from 'debug';\n\n\/\/ Format: lobe-[module]:[submodule]\nconst log = debug('lobe-server:market');\n\nlog('Simple message');\nlog('With variable: %O', object);\nlog('Formatted number: %d', number);\n```\n\n## Namespace Conventions\n\n- Desktop: `lobe-desktop:[module]`\n- Server: `lobe-server:[module]`\n- Client: `lobe-client:[module]`\n- Router: `lobe-[type]-router:[module]`\n\n## Format Specifiers\n\n- `%O` - Object expanded (recommended for complex objects)\n- `%o` - Object\n- `%s` - String\n- `%d` - Number\n\n## Enable Debug Output\n\n### Browser\n\n```javascript\nlocalStorage.debug = 'lobe-*';\n```\n\n### Node.js\n\n```bash\nDEBUG=lobe-* bun run dev\nDEBUG=lobe-* pnpm dev\n```\n\n### Electron\n\n```typescript\nprocess.env.DEBUG = 'lobe-*';\n```\n\n## Example\n\n```typescript\n\/\/ apps\/server\/src\/routers\/lambda\/agentEval.ts\nimport debug from 'debug';\n\nconst log = debug('lobe-lambda-router:agent-eval');\n\nlog('getAgent input: %O', input);\n```\n","use_cases":["Enable debug logging for server-side modules like 'lobe-server:market'","Log complex objects with formatted output in client-side applications","Debug router modules with namespace 'lobe-router:module'"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/lobehub\/lobehub\/blob\/54382b5c8e81544da454fa6d7b50f461a562c1ee\/.agents\/skills\/debug-package\/SKILL.md","source_commit":"54382b5c8e81544da454fa6d7b50f461a562c1ee","license":null,"version":null,"listing_approved_at":"2026-11-22","created_at":"2026-11-21T11:07:50.000000Z","updated_at":"2026-11-22T11:17:05.000000Z","seo_title":"Debug Package Logging for Lobe Framework","seo_description":"Learn how to use the debug package for logging in Lobe framework applications. Configure debug output for server, client, and router modules.","seo_keywords":["Lobe debug logging","Lobe framework logging","Debug package configuration","Lobe server logging","Lobe client logging"]}}