You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace debug mode with extensible hook-based system (#630)
* refactor: replace debug mode with extensible hook-based system
- Remove isInDebugMode parameter from initialize() method (BREAKING)
- Implement WorkmanagerDebugHandler interface for both Android and iOS
- Add LoggingDebugHandler for development (uses native logging systems)
- Add NotificationDebugHandler for visual debugging
- Support custom debug handlers for extensible debugging
- No debug output by default - opt-in via platform-specific setup
- Clean separation between core functionality and debug concerns
- Add comprehensive documentation in docs/debug.md
* docs: fix documentation structure for docs.page
- Update existing debugging.mdx instead of creating new files
- Follow proper docs.page structure with frontmatter and tabs
- Remove incorrectly placed debug.md from root docs folder
* feat: complete hook-based debug system implementation
- Replace isInDebugMode parameter with extensible hook system
- Add WorkmanagerDebugHandler interface/protocol for Android/iOS
- Implement LoggingDebugHandler and NotificationDebugHandler
- Add WorkmanagerDebug global registry for handler management
- Remove old DebugNotificationHelper and UserDefaultsHelper debug code
- Update documentation with proper Tabs component syntax
- Clean up workmanager/README.md to avoid duplication with docs.page
- Fix all integration tests and update mocks
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: finalize hook-based debug system with cross-platform TaskStatus enum
- Move TaskStatus enum to Pigeon for consistent cross-platform types
- Regenerate all Pigeon-generated files with TaskStatus enum
- Update mocks to include deprecated isInDebugMode parameter
- Add backward compatibility test ensuring deprecated parameter still compiles
- Update CLAUDE.md to document code generation workflow
All tests passing and hook-based debug system is complete with:
- Abstract WorkmanagerDebug class with static current handler
- onTaskStatusUpdate and onExceptionEncountered methods
- Complete platform consistency between Android and iOS
- Backward compatibility maintained through deprecation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: resolve all GitHub Actions build failures
- Update iOS deployment target to 14.0 for Logger compatibility
- Fix Android TaskStatus import errors in debug handlers
- Fix iOS internal type visibility issues
- Update example app iOS deployment target in Xcode project
- Add comprehensive pre-commit requirements including example builds
- Ensure both Android APK and iOS app build successfully
All platforms now build without errors and pass formatting checks.
* chore: finalize hook-based debug system implementation
All GitHub Actions fixes applied and both example builds working:
- iOS 14.0 deployment target set across all components
- Android TaskStatus imports resolved
- iOS internal type visibility fixed
- Comprehensive pre-commit requirements documented
- Both Android APK and iOS app build successfully
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: streamline changelog entries for better user experience
- Simplify changelog language to focus on user actions needed
- Remove internal implementation details (Flow observability, Pigeon updates)
- Add clear explanation for KEEP -> UPDATE default change
- Maintain consistent format across all package changelogs
- Keep only user-impacting information and migration guidance
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: move deprecated_member_use ignore comment to correct line
The ignore comment needs to be on the line where the deprecated parameter
is actually used, not above the return statement.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* remove agent
* feat: enhance debug system with task status tracking and configurable notifications
- Replace deprecated isInDebugMode with hook-based debug handlers to slim down plugin
- Add TaskStatus.SCHEDULED and TaskStatus.RESCHEDULED for better task lifecycle visibility
- Fix notification flow: Started → Rescheduled → Retrying → Success
- Add configurable notification channels and grouping for debug handlers
- Update notification icons to cleaner symbols (▶️ ✅ ❌ 🔄 ⏹️ 📅)
- Add comprehensive task status documentation with platform differences
- Fix Android retry detection using runAttemptCount
- Remove duplicate exception notifications for normal task failures
- Update example apps to demonstrate new debug configuration
Fixes#439Fixes#367Fixes#556
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: standardize code formatting and improve example app structure
- Fix Kotlin package naming to follow conventions (dev.fluttercommunity.workmanager.example)
- Use shorthand dot notation in AndroidManifest.xml for cleaner configuration
- Apply ktlint and swiftlint formatting fixes across all platforms
- Remove trailing whitespace from Swift files
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: update changelogs for hook-based debug system release
- Add new features: NotificationDebugHandler, LoggingDebugHandler, TaskStatus enums
- Document breaking changes for isInDebugMode deprecation
- Include bug fixes for retry detection and periodic task frequency
- Focus on user-facing changes and benefits
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/debugging.mdx
+118-8Lines changed: 118 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,128 @@ description: Debug and troubleshoot background tasks on Android and iOS
5
5
6
6
Background tasks can be tricky to debug since they run when your app is closed. Here's how to effectively debug and troubleshoot them on both platforms.
7
7
8
-
## Enable Debug Mode
8
+
## Hook-Based Debug System
9
9
10
-
Always start by enabling debug notifications:
10
+
The Workmanager plugin uses a hook-based debug system that allows you to customize how debug information is handled.
11
+
12
+
### Quick Setup
13
+
14
+
Initialize Workmanager without any debug parameters:
11
15
12
16
```dart
13
-
Workmanager().initialize(
14
-
callbackDispatcher,
15
-
isInDebugMode: true, // Shows notifications when tasks execute
0 commit comments