Xamarin: Unable to Debug Android Application

xambear

Using Visual Studio 2017 and opening small Xamarin forms application, building then debug-run I get the following error in the output window.  This occurred while using the Visual Studio Android emulator.

“Android application is debugging.
Could not connect to the debugger.”

 

The solution was to open Hyper-V Manager, find the emulator (ensure that the emulator is shutdown), Settings – Processor then select ‘Migrate to a physical computer…’

image

While this seemed like the complete solution it wasn’t.  One of my projects I could debug while the other one I could not.  I compared the two csproj files and found this difference.

image

 

Once I set my project option to <DebugSymbols>True</DebugSymbols> it worked and I could F5 Debug the solution/project.

 

Reference: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/#Troubleshooting

http://dotnetbyexample.blogspot.com/2016/02/fix-for-could-not-connect-to-debugger.html

Author

david

comments powered by Disqus

Categories

Recent Tweets

"Setting up and Getting Started with Power BI Embedded | Data Exposed" channel9.msdn.com/Shows/Data-Exp… #webcast #feedly
Retweeted by @dyardy @scottgu @victoriabeckham Worlds collide, double take on that photo!
@scottgu @victoriabeckham Worlds collide, double take on that photo!
@projectedxyz It is really easy, what are you doing (isn't this data which on the web)