debug-log-patterns
Language-specific debug logging patterns and best practices. Reference when adding instrumentation for Dart/Flutter, Kotlin/Android, Swift/iOS, or JavaScript/TypeScript applications.
Best use case
debug-log-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Language-specific debug logging patterns and best practices. Reference when adding instrumentation for Dart/Flutter, Kotlin/Android, Swift/iOS, or JavaScript/TypeScript applications.
Teams using debug-log-patterns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/debug-log-patterns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How debug-log-patterns Compares
| Feature / Agent | debug-log-patterns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Language-specific debug logging patterns and best practices. Reference when adding instrumentation for Dart/Flutter, Kotlin/Android, Swift/iOS, or JavaScript/TypeScript applications.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Debug Log Patterns ## Overview This skill provides copy-paste-ready logging patterns for common debugging scenarios across multiple languages. Use these patterns when instrumenting code during PDCA debug cycles. ## Supported Languages | Language | File | Primary Use Case | |----------|------|------------------| | Dart/Flutter | `references/dart-flutter.md` | Flutter mobile/web apps | | Kotlin/Android | `references/kotlin-android.md` | Native Android apps | | Swift/iOS | `references/swift-ios.md` | Native iOS apps | | JavaScript/TypeScript | `references/javascript-typescript.md` | Web apps, Node.js, React Native | ## Universal Conventions ### Log Format Standard All logs should follow this format for consistency: ``` [ClassName] methodName: description key=value ``` ### Log Levels | Level | When to Use | |-------|-------------| | DEBUG/TRACE | Detailed flow tracing, variable values | | INFO | Significant events, state transitions | | WARN | Unexpected but recoverable situations | | ERROR | Failures that affect functionality | ### Common Patterns (All Languages) #### Pattern: Method Entry/Exit ``` [ClassName] methodName: ENTER params=(param1, param2) [ClassName] methodName: EXIT result=value ``` #### Pattern: Conditional Branch ``` [ClassName] methodName: condition branch=TAKEN/SKIPPED reason=why ``` #### Pattern: Loop Iteration ``` [ClassName] methodName: loop iteration=N/total item=current ``` #### Pattern: State Transition ``` [ClassName] methodName: state from=oldState to=newState trigger=event ``` #### Pattern: Async Operation ``` [ClassName] operationName: START [ClassName] operationName: SUCCESS result=summary [ClassName] operationName: ERROR error=message ``` ## Quick Selection Guide **Debugging Flutter/Dart app?** -> See `references/dart-flutter.md` **Debugging Android native (Kotlin)?** -> See `references/kotlin-android.md` **Debugging iOS native (Swift)?** -> See `references/swift-ios.md` **Debugging web/Node.js/React?** -> See `references/javascript-typescript.md` ## Best Practices 1. **Be specific** - Include actual values, not just "value changed" 2. **Be consistent** - Use the same format throughout the codebase 3. **Be temporary** - Remove debug logs after issue is resolved 4. **Be contextual** - Include enough info to understand without seeing code 5. **Be careful with sensitive data** - Never log passwords, tokens, PII ## References - `references/dart-flutter.md` - Dart/Flutter logging patterns - `references/kotlin-android.md` - Kotlin/Android logging patterns - `references/swift-ios.md` - Swift/iOS logging patterns - `references/javascript-typescript.md` - JavaScript/TypeScript logging patterns
Related Skills
debugging-workflow
Systematic debugging workflow with parallel agent exploration, root cause analysis, and fix verification. Adapted from feature-dev methodology for bug investigation.
debugging-toolkit-smart-debug
Use when working with debugging toolkit smart debug
debugging-strategies
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance iss...
debugging
Debugging techniques for Python, JavaScript, and distributed systems. Activate for troubleshooting, error analysis, log investigation, and performance debugging. Includes extended thinking integration for complex debugging scenarios.
debugging-methodology
Systematic debugging methodology following reproduce → locate → hypothesize → verify → fix → regression workflow. Use when debugging issues, investigating bugs, troubleshooting problems, or when asked about debugging process, problem-solving, or issue investigation.
debugging-master
Systematic debugging methodology - scientific method, hypothesis testing, and root cause analysis that works across all technologiesUse when "bug, debugging, not working, broken, investigate, root cause, why is this happening, figure out, troubleshoot, doesn't work, unexpected behavior, debugging, root-cause, hypothesis, scientific-method, troubleshooting, bug-hunting, investigation, problem-solving" mentioned.
debug
Debug container agent issues. Use when things aren't working, container fails, authentication problems, or to understand how the container system works. Covers logs, environment variables, mounts, and common issues.
debug-validator-checkpoint-inconsistency
Debug validator checkpoint inconsistencies where some validators are behind others. Use when alerts mention "checkpoint inconsistency", "validators behind", or "inconsistent latest checkpoints", or when asked to debug validator sets, investigate validator delays, or troubleshoot metadata fetch failures for a chain. Defaults to default_ism app context if not specified.
debug-detective
Systematic debugging approach for ANY codebase, ANY language, ANY bug type. Use when facing unexpected behavior, crashes, performance issues, or intermittent problems.
debug:angular
Debug Angular applications systematically with expert-level diagnostic techniques. This skill provides comprehensive guidance for troubleshooting dependency injection errors, change detection issues (NG0100), RxJS subscription leaks, lazy loading failures, zone.js problems, and common Angular runtime errors. Includes structured four-phase debugging methodology, Angular DevTools usage, console debugging utilities (ng.probe), and performance profiling strategies for modern Angular applications.
ddd-tactical-patterns
Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.
database-patterns
Use when designing database schemas, implementing repository patterns, writing optimized queries, managing migrations, or working with indexes and transactions for SQL/NoSQL databases.