android: Debugging hangs on "Starting Android application"

Steps to Reproduce

  1. Select run from VS2017

Expected Behavior

App should build and then run, immediately going into the debugger.

Actual Behavior

Output says “Starting Android application” and then the Run button becomes enabled again. Some amount of time (30 seconds or so) goes by and all of a sudden the Run button becomes disabled again and the debugger starts.

Version Information

Microsoft Visual Studio Professional 2017 Version 15.6.6 VisualStudio.15.Release/15.6.6+27428.2037 Microsoft .NET Framework Version 4.7.02558

Installed Version: Professional

Visual C++ 2017 00369-60000-00001-AA214 Microsoft Visual C++ 2017

.NET Portability Analyzer 1.1.10808.0 Evaluates portability of assemblies across .NET platforms.

Application Insights Tools for Visual Studio Package 8.11.10402.2 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.40314.0 ASP.NET and Web Tools 2017

C# Tools 2.7.0-beta3-62715-05. Commit Hash: db02128e6e3c4bdfc93e6ec425ac9162b4d4fe80 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0 JavaScript Language Service

JavaScript Project System 2.0 JavaScript Project System

JavaScript UWP Project System 2.0 JavaScript UWP Project System

JetBrains ReSharper Ultimate 2017.3.5 Build 111.0.20180323.160610 JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.

Merq 1.1.17-rc (cba4571) Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 4.9.11-pre (71eb098) Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.6.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

TypeScript Tools 15.6.20202.3 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 2.7.0-beta3-62715-05. Commit Hash: db02128e6e3c4bdfc93e6ec425ac9162b4d4fe80 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake

Visual Studio Tools for Universal Windows Apps 15.0.27428.01 The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac 1.0 Mac Extension for Visual Studio

Xamarin 4.9.0.753 (f0f46392f) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.10.96 (a702a9ceb) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK 8.2.0.16 (HEAD/a78295902) Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 11.9.1.24 (f62de47) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Log File

xamarin-logs.zip

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 28 (2 by maintainers)

Most upvoted comments

In my case, I disabled the Mono Debugging for Visual Studio extension. When trying to debug the app, an error occurred and in the logs it showed that there was a null reference in Xamarin Inspector. I disabled this option and then activate Mono Debugging. That solved the problem, it no longer hangs when you start the debug session

I keep seeing this solution for this flavor of problem but with VS 15.8 I do not see how to disable Mono Debugging for Visual Studio as it seems to now be a system component.

So I think this is a debugger issue. In VS 15.7.0 I now see Extension 'Mono Debugging for Visual Studio 4.10.5' likely caused 195 seconds of unresponsiveness.. Disabling the Shared Runtime has no effect.

I am seeing this too on Xamarin.Forms project. I tried rolling back to VS 15.5.7 - no effect. What solves the problem for me is re-cloning my GIT repo. This allows the debugger to start on iOS and Driod normally. Then after a while the problem starts again. I haven’t pinned down what causes the problem but most likely a file on disk somewhere. Would be interested if re-cloning GIT repo helps anyone else.

I am seeing this as well

@nwestfall : I know. For now, I’ve disabled the Mono Debugging Visual Studio extension on the Windows machine, and, so far, so good. I can still debug my Android project.