Justin
Justin

Reputation: 18236

Breakpoints not being hit on Xamarin Android

Yesterday I upgraded to Xamarin.Android 7.3.0, and now none of my breakpoints get hit. I've tried many things to try to get breakpoints to work again, but no luck:

It doesn't make sense to me that even after creating a brand new project and running it with rolled back Xamarin versions, it still doesn't work. This should eliminate it being the code, and eliminate it being the Xamarin update, and yet it still doesn't work.

The pdb files are generated, so that's something. I have my configuration set to Debug-Dev, this has Debug Information set to Full, and Define Symbols set to:

DEBUG;__ANDROID__

I'm not sure what else to try at this point, help would be appreciated!

enter image description here

enter image description here

Upvotes: 5

Views: 2758

Answers (2)

Ana Gutierrez
Ana Gutierrez

Reputation: 21

I had this problem for months, the root folder where I had all my projects had a "@" , I renamed it and now the break points are working just fine.

Upvotes: 2

Claudio Redi
Claudio Redi

Reputation: 68440

This seems to be a bug a bug related to mono 5.0 upgrade. Solution from Bugzilla

Alternate possible temporary workaround for users who have hit this issue after updating (as opposed to a fresh install on a new machine)

(For users who might wish to continue to use Xamarin Studio 6.3 for a little while before transitioning completely to Visual Studio for Mac.)

  1. Set "Project > Active Runtime" to "Mono 4.8.0 (8f6d0f6) (/Library/Frameworks/Mono.framework/Versions/4.8.0)".

  2. Rebuild the Android app project.

Explanation

By default the Mono 5.0 installer will leave the Mono 4.8 tools installed alongside the new Mono 5.0 tools. When the Xamarin.Android build process runs under Mono 4.8, it will generate the old .mdb debugger symbol file format for user assemblies, so the Xamarin Studio debugger will be able to use those symbols. Do note though that the framework debugger symbols files for Xamarin.Android are all shipped as portable .pdb files starting with Xamarin.Android 7.3, so stepping into framework code (as opposed to user code) still would not work as expected.

Upvotes: 6

Related Questions