Microsoft delivers test builds of Visual Studio for Mac, Visual Studio 2017 for Windows. Microsoft is releasing a first Visual Studio for Mac preview, as well as a near-final Release Candidate of.
-->
This article explains how to debug a Xamarin.Android application on a physical Android device.
Debug on Device Overview
It is possible to debug a Xamarin.Android app on an Android device usingeither Visual Studio for Mac or Visual Studio. Before debugging canoccur on a device, it must besetup for developmentand connected to your PC or Mac.
Debug Application
Once a device is connected to your computer, debugging aXamarin.Android application is done in the same way as any otherXamarin product or .NET application. Ensure that the Debugconfiguration and the external device is selected in the IDE, this willensure that the necessary debug symbols are available and that the IDEcan connect to the running application:
Next, a breakpoint is set in the code:
Once the device has been selected, Xamarin.Android will connect to thedevice, deploy the application, and then run it. When the breakpoint isreached, the debugger will stop the application, allowing theapplication to be debugged in a fashion similar to any other C#application:
Next, a breakpoint is set in the code:
Once the device has been selected, Xamarin.Android will connect to thedevice, deploy the application, and then run it. When the breakpoint isreached, the debugger will stop the application, allowing theapplication to be debugged in a fashion similar to any other C#application:
Summary
In this document discussed how to debug a Xamarin.Androidapplication by setting a breakpoint and selecting the targetdevice.