O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging in an emulator

In this recipe, you'll learn how to use the breakpoint and the step-by-step debugging capacities of Xamarin Studio. This will be particularly helpful when facing a bug or to inspect variables values on the fly.

Getting ready

Create a new solution named Debugging.

How to do it...

To begin with debugging, you'll need to perform the following steps:

  1. Your MainActivity class should look as follows if you have created your new solution with Xamarin Studio:
    int count = 1; protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required