Reputation: 797
I am developing an app in Xamarin Android and I keep getting this warning in Visual Studio:
Android Application is running (debug is disabled in android project properties)
How can i enable debug in android project properties?? I have added in AssemblyInfo.cs the following code as mentioned somewhere.
#if DEBUG
[assembly: Application(Debuggable = true)]
#else
[assembly: Application(Debuggable=false)]
#endif
But nothing changes and no breakpoints are being hit.
Upvotes: 17
Views: 20561
Reputation: 1453
There are a few things you need to look at.
https://forums.xamarin.com/discussion/40832/breakpoints-not-being-hit-for-android-and-xamarin-forms
Edit: This answer is pretty old and applies to pre MAUI
Upvotes: 15
Reputation: 101
i had the same problem. Then I :
Upvotes: 10
Reputation: 9134
I had to turn Optimize Code option OFF
which I had turned ON by mistake I think.
After that delete bin and obj folders and rebuilding did the work.
Upvotes: 8
Reputation: 177
In my case -> build -> Configuration Manager -> change de relea
Upvotes: 5
Reputation: 19820
In my case, finally restart of Visual Studio helped (maybe due to a VS/Xamarin bug). (Project was configured properly.)
Upvotes: 7