Debug on Device

PDF for offline use
Related Articles:

Let us know how you feel about this

Translation Quality


last updated: 2017-03

This article explains how to debug a Xamarin.Android application on a device.


It is possible to debug a Xamarin.Android on an Android device using either Visual Studio for Mac or Visual Studio.


Before debugging can occur on a device, it must be setup for development and connected to your PC or Mac.

Debug Application

Once a device is connected to your computer, debugging a Xamarin.Android application is done in the same way as any other Xamarin product or .NET application. Ensure that the Debug configuration and the external device is selected in the IDE, this will ensure that the necessary debug symbols are available and that the IDE can connect to the running application:

Debug configuration selected

Debug configuration selected

Next, a breakpoint is set in the code:

Breakpoint set at line of code

Breakpoint set at line of code

Once the device has been selected, Xamarin.Android will connect to the device, deploy the application, and then run it. When the breakpoint is reached, the debugger will stop the application, allowing the application to be debugged in a fashion similar to any other C# application:

Breakpoint reached

Breakpoint reached


In this document discussed how to debug a Xamarin.Android application by setting a breakpoint and selecting the target device.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.