Debug Window
The debug window is a useful tool to simplify your debugging experience. It helps with the following aspects:
- Access to your logs right on a mobile device
- Check the connectivity to the LogDog servers
- A kill switch to fully disable the LogDog SDK
- Toggling on/off sub-features of LogDog
- Delete Logs
- Delete Mock cache
The debug modal can be integrated into your application in different ways.
One recommended way it to place the apps version number in a settings menu and require for example 3-5 taps until it shows the debug window. This way users will not trigger it by accident.
Example Jetpack Compose
@Composable
fun Main(activity: MainActivity) {
var clickCount by remember { mutableIntStateOf(0) }
val showSheet = clickCount >= 3
val sheet = remember(activity) { LogDogSettingsSheet(activity) }
Scaffold(modifier = Modifier.fillMaxSize()) { padding ->
Column(modifier = Modifier.fillMaxSize()) {
TextButton(
onClick = { clickCount++ },
modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp, vertical = 60.dp)
) {
Text("Show Debug Sheet ($clickCount/3)")
}
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center
) {
Text("Hello from LogDog")
}
}
sheet.Content(isShown = showSheet, onDismiss = {
clickCount = 0
})
}
}
Debug Shake
LogDog detects if you shake your device and then shows the debug window. This functionality is active by default.
If this default behaviour is not desired please use the following:
LogDog.setDebugShake(false)
info
The debug window can also be triggered via the LogDog dashoard.
Open the dashboard and click on any device. Then click on Open Debug Window
.