Skip to main content

Debug Window

The debug window is a useful tool to simplify your debugging experience. It helps with the following aspects:

  • Access to you logs on your 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.

  1. Hidden Button: Add a hidden button inside your application that triggers it

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:
import SwiftUI
import LogDog

struct ContentView: View {
@State private var isShown = false

var body: some View {
VStack(spacing: 20) {
Text("Hello, world!")
Button("Show LogDog Sheet") {
isShown = true
}
}
// Conditionally show the LogDog debug sheet
.logDogSheet(isShown: isShown)
}
}

  1. Shake*: Shake your device to show

LogDog detects if you shake your device and can then show the debug window. This functionality can be disabled with LogDog.setDebugShake(false).

  1. Via Dashboard: Trigger it via the LogDog Dashboard

Open the dashboard and click on any device. Then click on Open Debug Window.