3

I am using Mono for Android and I a like it so far. My only concern is that debugging projects is very slow. When I start debugging in Visual Studio sometimes it takes 4-5 seconds to move from one breakpoint to the next one. It seems the debugger also stops at lines I didn't mark with breakpoints. Is there a way to speed up debugging?

Xamarin - Mono for Android: http://xamarin.com/monoforandroid

I am using the emulator; running the project from Visual Studio directly. I tried to create very powerful devices; more resources but it didn't really help. I changed processor affinity as well but it didn't make a difference.

I have a pretty powerful machine; Sony Vaio F Series Notebook 256GB SSD, Intel Core i7-2860QM, 2.50GHz, 8 GB RAM. Bios hardware virtualization is on.

I am using a licensed and registered version of Mono for Android (not the trial version), Visual Studio 2010 Pro and .net 4. The operating system is Windows 7 Pro 64bit.

On the Mono for Android forums the guys suggested using my phone instead. They claim that the issue is related to the emulator, which is unlikely since I don't have this problem with Java and Eclipse.

http://mono-for-android.1047100.n5.nabble.com/Debugging-in-VS2010-is-unusable-td4796099.html;cid=1326191848900-192

Jeno Laszlo
  • 2,023
  • 18
  • 36
  • Re tagging; Xamarin's landing page in up-to-date builds of MonoDevelop still links to [tag:monodroid] - I suggest: use that; see http://i.stack.imgur.com/5XmND.png – Marc Gravell Jan 10 '12 at 09:19
  • Are you debugging against an emu, or via adb? – Marc Gravell Jan 10 '12 at 09:22
  • I am using the emulator. I tried to create very powerful devices; more resources but it didn't really help. I changed processor affinity as well but it didn't make a difference. – Jeno Laszlo Jan 10 '12 at 09:40
  • k; if you are using the emu, what is your PC hardware? (rough approximation) – Marc Gravell Jan 10 '12 at 09:45
  • Sony Vaio F Series Notebook 256GB SSD (Intel Core i7-2860QM second generation processor) 2.50GHz, 8 GB RAM. Bios hardware virtualization is on. – Jeno Laszlo Jan 10 '12 at 09:50
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/6572/discussion-between-jeno-laszlo-and-marc-gravell) – Jeno Laszlo Jan 10 '12 at 09:58
  • Debugging a real device is supposed to be faster. Monodroid+emulator is always slow as hell. – CodesInChaos Jan 10 '12 at 11:12
  • Yeah. I don't doubt that. My issue is that Mono for Android seems to be significantly slower than Eclipse. If you check the forum post you will see that one dude has to wait 8 minutes for a http request (which normally takes 2 secs). It is a commercial product there must be a trick I am not aware of. – Jeno Laszlo Jan 10 '12 at 11:18

2 Answers2

3

You might try Genymotion. Super easy install, works out-of-the-box with MonoDroid, and is really fast (pretty much instant stepping in debugger).

Mike
  • 1,169
  • 9
  • 26
  • Yes, genymotion is much faster because it's not an emulator, but rather a VirtualBox vm running android. Can't recommend it enough! – Johannes Rudolph Sep 26 '14 at 17:05
3

My experience with the Android emulator is, the lower the resolution of the device the faster it runs. Also enabling snapshots helps a lot.

Xamarin has announced that next release of Mono for Android will support x86. The x86 version of the emulator is way faster and that could resolve your painful experience with the phone emulator.

Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • +1 Thanks for the tip. It seems 4 is out. I will check it out and will verify whether the speed is better or not. http://xamarin.com/pr/mono-for-android-4-0-released – Jeno Laszlo Jan 10 '12 at 12:21
  • Support for x86 is coming in 4.0.2 afaik. – Cheesebaron Jan 10 '12 at 12:32
  • Is there any chance you know a link to a more detailed project roadmap? I only found this: http://android.xamarin.com/Roadmap They acknowledged the debugger performance issues but no future release numbers, etc were mentioned. – Jeno Laszlo Jan 10 '12 at 13:17
  • 1
    I got this information from the mailing list and looking at the github branches for the samples. Here is a link to the thread stating the support for x86: http://mono-for-android.1047100.n5.nabble.com/x86-Android-td5124319.html If you look at github, they have recently created a 4.0.2 branch, which I would think is the next release. – Cheesebaron Jan 10 '12 at 13:50
  • FYI here are the instructions on how to configure x86 emulator http://docs.xamarin.com/android/getting_started/installation/Configuring_the_x86_Emulator – Miha Markic Jun 10 '12 at 19:51