Hello friends. In this article, we will talk about how we can instantly see the events that we log to Firebase with Xamarin Forms. It is very important to be able to see this because this is how we can see if it is working properly. Testers can also check with Debug View. In my previous article, I talked about how to log an event to Firebase with Xamarin Forms, you can find it here.
It’s actually pretty simple to do this. Let’s start with the android part first. You need to run the logged project on an emulator or your physical device. After that, you need to open the terminal and go to your Android SDK location. Because we need to mark this application as debug via adb. If you don’t know how to navigate from the terminal to your SDK location, you can also go through Visual Studio. If you choose SDK Command Prompt from the Tools section; Visual studio will open the terminal for you and go to the correct location.
Here, you only have to write a single line of code. You need to enter the package name of your application instead of Package Name.
adb shell setprop debug.firebase.analytics.app <packagename>
Then, while logging the event, we will be able to see which event is logged on the android side via Debug View with a few seconds delay.
There are simpler methods for this process on the iOS side. Click the Run With option from the Run section and customize it while running the application. For this, we need to add the following line in the Extra Mlaunch Arguments section. In this way, we enable Debug View in the application.
If you have questions, you can reach by e-mail or comment. Good work.