Closed dlpopescu closed 6 years ago
I'm pretty sure this is the same as #1547
@dlpopescumtk @kjeremy is this happening on an emulator? And is that emulator x86? The logs here seem to indicate otherwise, and ARM emulators are super slow, which would explain the delays.
@joj: happens on every device, be it emulator or physical device, arm or x86.
Every device and emulator.
On Fri, May 11, 2018, 2:52 PM Lucian Popescu notifications@github.com wrote:
@joj https://github.com/joj: happens on every device, being it emulator or physical device, arm or x86.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-android/issues/1664#issuecomment-388454248, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIBRK-0x7CDKcDhIoMBO4pOmk_xc78Zks5txd4GgaJpZM4T4n3X .
That's good. We can eliminate the specific emulators/devices as culprits then. We'll look into the logs, see if we can find something weird there. Build seems to be working fine, though, right? Both bugs mention separate build and start steps. During the build step you get Start disabled, and it's taking a reasonable amount of time to run?
@joj: on my windows machine, takes at least 3 min to start debugging. For now, I've disabled the Mono.Debugger extension, but I'm not sure it SHOULD be disabled. Re-enabling the extension and re-cloning a git repo makes the IDE hang for a couple of seconds only but, after a while, it starts again, hanging for 3 mins.
I don't understand. If you can debug, you have mono debugger. If you're actually seeing it then you probably have it duplicated and that's where the delay is coming from? If you can debug without that, by all means disable it.
Recloning points to something else, though. Most likely a locked file somewhere (maybe even a git cache file).
Cross-referencing note for the Microsoft team
The same error message has also been reported in: https://developercommunity.visualstudio.com/content/problem/251070/slow-xamarin-tooling.html
@joj: Of course I can just disable it and move on, but that would just be like sweeping it under the rug:
If you can debug then you have a mono debugger installed. That's the component that gives you debugging to begin with.
We made that component invisible a few versions ago because it is very core to the experience. The one you can see may be a duplicate and a duplicate that is getting in the way by the looks of it. I want to understand if that's the case.
If it is then we have an installation bug which we need to fix, but manually removing this extra component will fix it and that will let you work normally, which is everybody's goal.
If you can't debug without that then what happened is that the debugger is not invisible and has a big I need to fix, or it may be something else entirely.
I need to understand which one it is to be able to fix it.
@joj: right, thank you for sheding some light on the component. I'll see what info I can put together and get back to you later today with it.
Excellent, thanks!
To be clear this has been happening since before the 15.7 release. I was seeing this in 15.6.x.
Where can we look to determine if we have multiple debuggers installed?
On Sat, May 12, 2018, 6:44 AM Joaquin Jares notifications@github.com wrote:
Excellent, thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-android/issues/1664#issuecomment-388546439, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIBRLZH8_xbbREYfSuPqCqDazBkXaLdks5txr0LgaJpZM4T4n3X .
@kjeremy I don't think your bug is the same as this one. Just in case, try disabling the mono debugger in tools - > extensions and updates, if you can see it. If you can debug after that the scenario is at least similar. You shouldn't be able to see it and further, you shouldn't be able to debug at all without that. But it's worth a try if you want.
@joj, it goes like this on my machine.
I'll let you draw conclusions, let me know if there's anything else I can do.
Freezing for a second is completely normal. 3 minutes is very bad. I need to figure out why you have that configuration (something on install, probably). If it let's you work by all means use it that way. I'll figure this one out. Also Jeremy's bug, which doesn't look related but we'll know soon enough :)
I will try to repro it tomorrow. Why don't you think it's related? I have the same symptoms.
On Sun, May 13, 2018, 8:51 AM Joaquin Jares notifications@github.com wrote:
Freezing for a second is completely normal. 3 minutes is very bad. I need to figure out why you have that configuration (something on install, probably). If it let's you work by all means use it that way. I'll figure this one out. Also Jeremy's bug, which doesn't look related but we'll know soon enough :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-android/issues/1664#issuecomment-388624612, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIBRLhM-LwGtdSXqCsTs2mPsRIT0li-ks5tyCxJgaJpZM4T4n3X .
You mention in the other bug that cloning from github fixes it for a while. That sounds like a file locking or a caching issue to me. I don't have enough data, though, so that's not much more than an educated guess at this point :)
That wasnt me. A reclone doesn't help me.
On Sun, May 13, 2018, 11:02 AM Joaquin Jares notifications@github.com wrote:
You mention in the other bug that cloning from github fixes it for a while. That sounds like a file locking or a caching issue to me. I don't have enough data, though, so that's not much more than an educated guess at this point :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-android/issues/1664#issuecomment-388633432, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIBRNf0rnQEgFcTI2WapfkZchfJBT60ks5tyEr2gaJpZM4T4n3X .
@joj, @kjeremy: that was me. Someone was saying that this helped and I've done it myself, but it doesn't change anything, actually. The issue still lies in that extension, I presume.
Excellent then. The best possible scenario is for you both to be in a place where you can do your work while I research the issue to understand how this happened, and make sure it doesn't happen again.
@joj, @kjeremy : quick update. Disabling the extension now prevents from debugging altogether. BUT! re-enabling it no longer hangs the IDE. Thus said, the extension is still visible in the VS extensions, even though, apparently, it shouldn't be.
Disabling the extension preventing debugging makes sense, though, unless it was duplicated (which is super weird). I don't want to sound discouraging, but I wonder if any benefits you may see from disabling/enabling will be temporary.
I just want to confirm the behaviour @kjeremy is experiencing. I get a warning of 188 second delay caused by Mono Debugger using latest 15.7. Other devs on our team using the latest 15.6 version also get the problem (but with no warning). This was not an issue with previous 15.6 versions from what we can remember. Disabling the Mono Debugger extension disables debugging altogether for us so this is not a work around.
Also get the same problems for clean repo. Also get the same problem with all extensions (R#, Live Player, Xamarin Profiler) turned off.
Same problem, disabling the debugger disables debugging... Not sure what to do.
Same here. Disabling the mono debugger also disables debugging. VS 15.8 preview 1.1
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 think the evidence is against disabling debugger now, so I need to look somewhere else. If disabling inspector works I can work with that team to figure out what's happening there. If it doesn't, I may need build/debug logs from any of you guys who can send them to see if I find something there. Sorry this is taking so long to figure out. Delays at that point can come from many different processes. There's a lot going on when an application is debugged.
Find attached my XamarinLogs.zip. I've got the inspector disabled and I'm still getting the delays.
I uninstalled Inspector/Workbooks from VS 2017 15.7.1 and VS 2017 15.8 preview. I also uninstalled using the Inspector/Workbooks MSI. Still the problem persists so it does not appear to be related to Inspector.
I am using the XF 3.1 preview nuget. Wondering if everyone else having this problem is as well...
Hi,
I can no longer disable the Mono.Debugging extension, since this would prevent me from debugging.
Xamarin logs: xamarin-logs.zip
The VS installation logs , as collected by the Collect tool from Microsoft.
Version info:
Microsoft Visual Studio Professional 2017 (2) Version 15.7.1 VisualStudio.15.Release/15.7.1+27703.2000 Microsoft .NET Framework Version 4.7.02556
Installed Version: Professional
C# Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea 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.
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
Mono Debugging for Visual Studio 4.10.5-pre (ab58725) 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
ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info
Visual Basic Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.1 for F# 4.1 15.7.0.0. Commit Hash: 16ecf5a30ad868d183c58e4a71a71c23d4ed3ba9. Microsoft Visual F# Tools 10.1 for F# 4.1
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
VisualStudio.Mac 1.0 Mac Extension for Visual Studio
VSColorOutput 2.5.1 Color output for build and debug windows - http://mike-ward.net/vscoloroutput
Xamarin 4.10.0.442 (396b18cef) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.12.264 (fc37cd02e) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96) Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.10.1.177 (7e782c1) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Just to add, also, when the debugging does start after 3-4 minutes, when a breakpoint is hit, passing the cursor over a variables, the debuggers show the Getting DataTip Text popup for about 3 minutes also before unlocking.
@nbelley : I concur. This whole debugging thing is driving me nuts.
I think I found the problem, on my android project, in the references, I had a bunch of invalid references to .netstandard 2.0 libraries, I deleted all those invalid references and debug seems back on the menu for me!
@nbelley solution worked for me too
works for me as well. The problem may have been adding the netstandard 2.0.2 nuget which adds all these bad references.
I'll let the android and mono teams know about this, in case they are doing something wrong there. At the very least, you should get a decent error message instead of a weird delay.
Thanks, @joj .
@nbelley, @brendanzagaeski :
This might be nuget related, more likely, but I'll post it here, see if anyone else has the same issue. I have created a .NET standard 2.0 library and installed FFImageLoading nuget. This common project is referenced by the Android project. Now, when I try to install FFImageLoading into the Android project, for some reason, it also asks to add ALL the nugets+dependencies in the common project. Might this have passed unnoticed, thus weird .NET standard references in the Android project?
@philipag : why would you install .NET standard nuget in an android project?
I can confirm that this solves the issue for me as well. There seems to be something wrong with referencing a common .NET Standard library from Android/iOS projects on Windows. To fix my issues I had to uninstall the .NET Standard 2.0.2 NuGet dependencies from the Android/iOS project and also the libraries using it. I then first updated the Android project to latest .NET Standard 2.0.3 NuGet and then reinstalled all the libraries that requires the .NET Standard NuGet into the Android project.
@dlpopescumtk : Various other nugets depend on it.
@cjlotz : I cannot update my entire solution to netstandard 2.0.3 because my shared code projects don't allow for it. VS says that and sdk has 2.0.1 dependencies so it seems XF is targeting 2.0.1 for them.
things are better but occasionally VS crashes and upon restart says that the Mono Debugging extension caused the crash. This usually happens when hoverng over a variable while the debugger is stopped or just leaving the debugger stopped for a while.
@cjlotz, @philipag : I went through about the same process. Ended up setting the default config of the NuGet package manager to PackageReference
first, in both projects, removing all packages and re-adding them, one by one, .Net standard class library project first.
The startup issue has been fixed, on my side.
@philipag For the shared .NET Standard Project, I updated NETStandard.Library
PackageReference to 2.0.3
by editing PackageReference
directly in the csproj
file. This seemed to work for me.
@cjlotz For my class library project types I have ".Net Standard 2.0" selected in the application properties page and the csproj file looks something like this:
`
`
So I am not sure how I can change this to 2.0.3.
There's a Developer Community where it's stated that the paths that are referenced are wrong (they have an extra backslash. Are you guys experiencing this? I will report this to .Net Standard and/or nuget, and I want to understand the impact.
Hey all, I fix it !!!! The problem was in references in a Class Library project, there was invalid and duplicate references after I have updated VS and Xamarin to latest versions.
Check all the references in all your projects, remove the invalid references may solve your problems.
@joj: Yes, I am seeing an extra backslash in the references.
I am experiencing the same same problem with the freeze at the "start debugging" step
As @dlpopescumtk suggests, the proper workaround seems to be to not use a mix of packages.config
and PackageReference
NuGet dependencies when referencing a shared .NET Standard project. When I switched my Android an iOS projects over to also use PackageReferences
everything started to work correctly again.
To migrate to PackageReference
dependencies I followed these steps.
There's a migrator in VS now. Here: https://blog.nuget.org/20180409/migrate-packages-config-to-package-reference.html
The TL;DR is that if you right click on the packages.config file (or the References node) you'll get a Migrate packages.config to PackageReference
option.
Steps to Reproduce
Expected Behavior
The app should be deployed to the device and run.
Actual Behavior
VS hangs for ~3 min, the a message pops up, saying Mono Debugging for Visual Studio 4.10.5 likely caused 194 seconds of unresponsiveness. Only after, does the app get deployed.
Version Information
Microsoft Visual Studio Professional 2017 Version 15.7.1 VisualStudio.15.Release/15.7.1+27703.2000 Microsoft .NET Framework Version 4.7.02556
Log File