A comprehensive, production-ready debug drawer for Android apps that provides developers with powerful debugging tools directly within their applications.
Stop switching between your app and external debugging tools. This library gives you everything you need for debugging right inside your app - real-time logcat streaming, network request monitoring, feature flag toggles, app inspection, and more. Perfect for QA testing, development debugging, and production troubleshooting.
Built by developers, for developers. Created by Malik Abualzait with a focus on simplicity, performance, and extensibility.
- ๐ Zero Setup - Get started in minutes with minimal configuration
- ๐ง Modular Design - Add or remove debugging modules as needed
- ๐ฑ Production Ready - Automatically disabled in release builds
- ๐จ Beautiful UI - Clean, intuitive interface following Material Design principles
- โก High Performance - Lightweight with minimal impact on app performance
- ๐งช Well Tested - Comprehensive test coverage with CI/CD pipeline
Want to try it right now? Download the latest APK and install it on your device:
- Click the button above โ Go to latest workflow run โ Download APK artifact
- Install on your Android device
- Open the app and tap "Toggle Debug Drawer"
- Explore all the debugging modules!
Pick and choose only the debugging tools you need. Each module is independent and can be added/removed dynamically.
- ๐ฑ App & Device Info - View app version, device model, Android version, and build details
- ๐ Network Monitoring - Real-time HTTP request/response logging with headers, timing, and status codes
- ๐ Advanced Logcat Viewer - Stream system and app logs with real-time filtering, search, and export
- ๐ฉ Feature Flags - Toggle features at runtime with persistent storage across app restarts
- โ๏ธ Settings Override - Modify app settings on-the-fly for testing different configurations
- ๐ Clipboard Tools - Copy/paste utilities for testing text input scenarios
- Zero Performance Impact - Automatically disabled in release builds
- Real-time Updates - Live log streaming and network monitoring
- Easy Integration - Works with existing Hilt/DI setup
- Extensible - Create custom modules for your specific needs
- Language: Kotlin
- UI: Traditional Android Views (XML + Kotlin)
- Dependency Injection: Hilt
- Networking: Retrofit + OkHttp (for request logging)
- Persistence: DataStore (feature flags & settings)
- Testing: JUnit, Mockito, Robolectric, Espresso
- Code Quality: ktlint, detekt
- Library Module (
debugdrawer
) โ reusable across projects - Sample App Module (
sampleapp
) โ demonstrates usage - Modular Design: Each widget = independent module that can be added dynamically to the drawer
The Android Debug Drawer is designed to be simple to integrate and use. Follow these steps to get started:
Add to your project's build.gradle.kts
(project level):
allprojects {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to your app's build.gradle.kts
:
dependencies {
debugImplementation("com.github.mabualzait:Android-Debug-Drawer:1.2.5")
}
Available versions:
1.2.5
- Latest stable release โ (JitPack auto-detection working)main-SNAPSHOT
- Latest development version
For contributing or custom modifications:
-
Clone and integrate:
git clone https://github.com/mabualzait/Android-Debug-Drawer.git # Copy debugdrawer folder to your project root
-
Add to
settings.gradle.kts
:include(":debugdrawer")
-
Add dependency:
dependencies { debugImplementation project(":debugdrawer") }
Step 1: Add Hilt to your project (if not already added):
plugins {
id("com.google.dagger.hilt.android")
id("kotlin-kapt")
}
dependencies {
implementation("com.google.dagger:hilt-android:2.48")
kapt("com.google.dagger:hilt-compiler:2.48")
}
Step 2: Update your Application class:
@HiltAndroidApp
class MyApplication : com.abualzait.debugdrawer.DebugDrawerApplication() {
// That's it! No additional code needed!
}
Step 3: Your MainActivity requires ZERO debug drawer code:
@AndroidEntryPoint
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// No debug drawer setup needed!
}
}
๐ Done! The debug drawer is now automatically available with:
- Gesture activation: Long press or double tap anywhere on screen
- All modules included: App info, network monitoring, logcat, feature flags, settings, clipboard
- Auto-initialization: Works across all activities
- Zero boilerplate: No manual setup required
Before (Old Way) | After (New Way) |
---|---|
โ 6+ @Inject declarations | โ 0 declarations needed |
โ Manual initialization | โ Automatic initialization |
โ Manual module registration | โ Auto-registered modules |
โ Manual cleanup in onDestroy | โ Automatic cleanup |
โ 20+ lines of setup code | โ 1 line: extend DebugDrawerApplication |
โ Button required for activation | โ Gesture-based activation |
โ Complex integration | โ True plug-and-play |
If you need custom control, you can still use the traditional approach:
@HiltAndroidApp
class MyApplication : Application() {
@Inject
lateinit var debugDrawerInitializer: com.abualzait.debugdrawer.DebugDrawerInitializer
override fun onCreate() {
super.onCreate()
debugDrawerInitializer.initializeIfEnabled(this)
}
}
// Show/hide programmatically
com.abualzait.debugdrawer.DebugDrawerUtils.toggle(context)
com.abualzait.debugdrawer.DebugDrawerUtils.show(context)
com.abualzait.debugdrawer.DebugDrawerUtils.hide(context)
// Check visibility
val isVisible = com.abualzait.debugdrawer.DebugDrawerUtils.isVisible(context)
Automatic Gestures (Zero Code Required):
- Long press anywhere on the screen
- Double tap anywhere on the screen
Programmatic Control (When Needed):
// Show/hide programmatically
com.abualzait.debugdrawer.DebugDrawerUtils.toggle(context)
com.abualzait.debugdrawer.DebugDrawerUtils.show(context)
com.abualzait.debugdrawer.DebugDrawerUtils.hide(context)
// Check visibility
val isVisible = com.abualzait.debugdrawer.DebugDrawerUtils.isVisible(context)
UI Button (Optional):
findViewById<Button>(R.id.btn_toggle_debug)?.setOnClickListener {
com.abualzait.debugdrawer.DebugDrawerUtils.toggle(this)
}
Module | Purpose | Key Features |
---|---|---|
๐ฑ App Info | App & device inspection | Version, package, device model, Android version |
๐ Network | HTTP monitoring | Request/response logging, timing, status codes |
๐ Logcat | Real-time log streaming | Live filtering, search, export, auto-scroll |
๐ฉ Feature Flags | Runtime feature toggles | Persistent storage, A/B testing support |
โ๏ธ Settings | Configuration override | Runtime settings modification |
๐ Clipboard | Text utilities | Copy/paste for testing scenarios |
๐ Development Debugging:
- Monitor network requests during API development
- Stream logs in real-time without switching to external tools
- Toggle features instantly for testing different flows
๐งช QA Testing:
- Inspect app version and device info for bug reports
- Test feature combinations with flag toggles
- Override settings to test edge cases
๐ Production Troubleshooting:
- Enable debug drawer in debug builds for customer support
- Export logs for analysis
- Monitor network issues in real-time
// Add/remove modules dynamically
debugDrawer.addModule(customModule)
debugDrawer.removeModule(logsModule)
// Check drawer state
if (debugDrawer.isVisible()) {
// Handle visibility
}
@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {
@Provides
@Singleton
fun provideOkHttpClient(networkInterceptor: NetworkInterceptor): OkHttpClient {
return OkHttpClient.Builder()
.addInterceptor(networkInterceptor)
.build()
}
}
@Inject
lateinit var featureFlagsModule: com.abualzait.debugdrawer.modules.FeatureFlagsModule
// Check feature state
lifecycleScope.launch {
val isEnabled = featureFlagsModule.isFeatureEnabled("new_feature")
if (isEnabled) {
// Enable new feature
}
}
class CustomModule @Inject constructor(
private val context: Context
) : DebugModule {
override val name = "custom"
override val title = "Custom Module"
override val description = "My custom debugging tool"
override fun createView(): View {
return LayoutInflater.from(context)
.inflate(R.layout.custom_module_layout, null)
}
}
android-debug-drawer/
โโโ debugdrawer/ # Library module
โ โโโ src/main/java/com/debugdrawer/
โ โ โโโ DebugDrawer.kt # Main debug drawer class
โ โ โโโ modules/ # Debug modules
โ โ โ โโโ AppInfoModule.kt
โ โ โ โโโ NetworkModule.kt
โ โ โ โโโ com.abualzait.debugdrawer.modules.FeatureFlagsModule.kt
โ โ โ โโโ LogsModule.kt
โ โ โ โโโ com.abualzait.debugdrawer.modules.SettingsModule.kt
โ โ โ โโโ ClipboardModule.kt
โ โ โโโ utils/ # Utility classes
โ โ โ โโโ Logger.kt
โ โ โ โโโ NetworkInterceptor.kt
โ โ โโโ di/ # Dependency injection
โ โ โโโ DebugDrawerModule.kt
โ โโโ src/main/res/layout/ # Layout files
โ โโโ module_app_info.xml
โ โโโ module_network.xml
โ โโโ ...
โโโ sampleapp/ # Sample application
โ โโโ src/main/java/com/debugdrawer/sampleapp/
โ โ โโโ MainActivity.kt
โ โ โโโ SampleApplication.kt
โ โ โโโ network/
โ โ โโโ SampleNetworkClient.kt
โ โโโ src/main/res/
โโโ .github/workflows/ # CI/CD workflows
โ โโโ ci.yml
โโโ README.md
โโโ build.gradle.kts
โโโ settings.gradle.kts
The project includes comprehensive testing:
./gradlew test
./gradlew connectedAndroidTest
./gradlew jacocoTestReport
./gradlew ktlintCheck
./gradlew detekt
This project maintains high code quality standards:
- ktlint for code formatting
- detekt for static analysis
- Unit tests with JUnit, Mockito, and Robolectric
- Integration tests with Espresso
- Code coverage reporting with JaCoCo
The project uses GitHub Actions for continuous integration:
- Code Quality Checks - ktlint, detekt
- Unit Tests - JUnit, Mockito, Robolectric
- Instrumented Tests - Espresso on Android emulator
- Build Verification - Debug and release APK builds
- Code Coverage - JaCoCo reports uploaded to Codecov
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
If you have any questions or need help, please:
- Check the Issues page
- Create a new issue if your question isn't already answered
- Join our discussions for general questions
Check out the sample app included in this repository to see the Android Debug Drawer in action:
- Clone the repository
- Open in Android Studio
- Run the
sampleapp
module - Tap "Toggle Debug Drawer" to see all features
Main debug drawer interface with module selection grid
Enhanced logcat viewer with real-time streaming and filtering
Network request monitoring and logging
App and device information display
- JitPack integration for easy dependency management
- More built-in modules (Database Inspector, Performance Monitor)
- Custom theme support
- Gesture-based activation (shake to open)
- Export functionality for logs and settings
- Plugin system for third-party modules
- Material Design for the UI components
- Hilt for dependency injection
- Retrofit for networking
- DataStore for data persistence
- Special thanks to the Android development community for inspiration and feedback
Developer: Malik Abualzait - Android Developer & Open Source Contributor
Made with โค๏ธ by Malik Abualzait for the Android development community