שתף באמצעות


Debug Xamarin.Android apps

This section discusses how to debug a Xamarin.Android app on devices or emulators.

Debugging Overview

Developing Android applications requires running the application, either on physical hardware or using an emulator. Using hardware is the best approach, but not always the most practical. In many cases, it can be simpler and more cost effective to simulate/emulate Android hardware using one of the emulators described below.

Debugging on the Android Emulator

This article explains how launch the Android emulator from Visual Studio and run your app in a virtual device.

Debugging on a Device

This article shows how to configure a physical Android device so that Xamarin.Android application can be deployed to it directly from either Visual Studio or Visual Studio for Mac.

Android Debug Log

One very common trick developers use to debug their applications is using Console.WriteLine. However, on a mobile platform like Android there is no console. Android devices provides a log that you will likely need to utilize while writing apps. This is sometimes referred to as logcat due to the command typed to retrieve it. This article describes how to use logcat.