flutter-debugging
Installation
SKILL.md
Logging
- Use a centralized
AppLoggerclass for all logging — NEVER useprint()or rawdebugPrint() - Define log levels:
verbose,debug,info,warning,error,fatal - In dev flavor: log everything (verbose and above)
- In staging: log info and above
- In production: log warning and above only, route to Crashlytics
- Include context in logs:
AppLogger.error('Failed to fetch user', error: e, stackTrace: st) - NEVER log sensitive data (passwords, tokens, PII) at any level
Flutter DevTools
- Use Widget Inspector to debug layout issues and identify unnecessary rebuilds
- Use Performance Overlay (
showPerformanceOverlay: true) to monitor frame rates - Use Timeline View to identify jank — target 16ms per frame (60fps)
- Use Memory View to detect memory leaks and monitor allocation patterns
- Use Network Profiler to inspect Dio requests/responses during development