You will use the Firebase built-in DebugView to debug and validate Analytics implementation and events for mobile app.
DebugView enables you to see the raw event data logged as they occur in your app in near real-time. This can help you discover errors and mistakes in our Analytics implementation and verify whether all events and user properties are logged correctly.
First, you need to enable debug mode in order to view Firebase Analytics in the DebugView report:
For Android, on a device or emulator, execute the following commands in the terminal:
adb shell setprop debug.firebase.analytics.app PACKAGE_NAME
When you run this command, you are setting a system property that tells the Firebase Analytics SDK to log debug information for a specific app (identified by its package name). You can find the package name in your app’s AndroidManifest.xml file or in the Firebase console.
This behavior persists until you explicitly disable debug mode by executing the following command:
adb shell setprop debug.firebase.analytics.app .none.
For iOS, specify the following command line argument in Xcode:
-FIRDebugEnabled
This behavior persists until you explicitly disable debug mode by specifying the following command line argument:
-FIRDebugDisabled
Once you enable debug mode, navigate to DebugView by clicking on Analytics tab and then selecting DebugView.
Then, just start using your app to see your app’s events being logged in the DebugView report as shown below: