Bug 56697 - Cannot debug in VS 2017 15.2 and up
Summary: Cannot debug in VS 2017 15.2 and up
Status: RESOLVED NORESPONSE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: 15.4
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2017-05-20 08:56 UTC by Artem Garkavyi
Modified: 2017-08-07 14:44 UTC (History)
10 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Artem Garkavyi 2017-05-20 08:56:17 UTC
Cannot debug in VS 2017 15.1 and up
Does not hit in breakpoint


Microsoft Visual Studio Professional 2017
Version 15.2 (26430.6) Release
VisualStudio.15.Release/15.2.0+26430.6
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA087
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA087
Microsoft Visual C# 2017

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

Visual F# 4.1   00369-60000-00001-AA087
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.6.00404.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Common Azure Tools   1.9
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 2016.3.2    Build 107.0.20170126.120331
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

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

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

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

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

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

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

TypeScript   2.2.2.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.26430.06
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.

Xamarin   4.5.0.443 (c871575)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.0.13 (448f54f)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.10.0.30 (30b6e87)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Joaquin Jares 2017-05-22 13:25:30 UTC
Hi Artem! Can you please provide the Debug Output, and also Build (set to verbosity Detailed). Both outputs are visible by going to the View menu and selecting Output. To change the verbosity of the build, in Tools->Options->Projects and Solutions->Build and Run, the first dropdown controls the verbosity of the output window.

Thanks,
joj
Comment 2 Artem Garkavyi 2017-05-22 16:41:19 UTC
Hi, Joj! Yes of course.

Build: 
Build started.
Project "TestApp.csproj" (GetAppBundleDir target(s)):
Done building project "TestApp.csproj".
Build succeeded.


Debug:
Launching 'TestApp' on 'iPhone 7 iOS 10.2'...
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/Xamarin.iOS.dll [External]
Thread started:  #2
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/TestApp.exe
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.iOS.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Core.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Platform.iOS.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Platform.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Binding.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/ClassLibrary1.dll
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/System.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Localization.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/Mono.Security.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/System.Core.dll [External]
Loaded assembly: /Users/User/Library/Developer/CoreSimulator/Devices/2B5663B3-7425-4F44-8BAE-84ABE0647ABF/data/Containers/Bundle/Application/C3978F53-F12B-439B-9046-F926FBEE07C4/TestApp.app/MvvmCross.Binding.iOS.dll [External]
2017-05-22 19:26:21.978 TestApp[21547:249392] Could not find `System.Runtime` referenced by assembly `ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null`.
2017-05-22 19:26:22.076 TestApp[21547:249392] mvx: Diagnostic:   0.01 Setup: PlatformServices start
2017-05-22 19:26:22.082 TestApp[21547:249392] mvx: Diagnostic:   0.03 Setup: MvvmCross settings start
2017-05-22 19:26:22.083 TestApp[21547:249392] mvx: Diagnostic:   0.03 Setup: Singleton Cache start
2017-05-22 19:26:22.084 TestApp[21547:249392] mvx: Diagnostic:   0.03 Setup: Bootstrap actions
2017-05-22 19:26:22.093 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: StringToTypeParser start
2017-05-22 19:26:22.096 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: CommandHelper start
2017-05-22 19:26:22.096 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: ViewModelFramework start
2017-05-22 19:26:22.097 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: PluginManagerFramework start
2017-05-22 19:26:22.098 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: App start
2017-05-22 19:26:22.099 TestApp[21547:249392] mvx: Diagnostic:   0.04 Setup: ViewModelTypeFinder start
2017-05-22 19:26:22.101 TestApp[21547:249392] mvx: Diagnostic:   0.05 Setup: ViewsContainer start
2017-05-22 19:26:22.102 TestApp[21547:249392] mvx: Diagnostic:   0.05 Setup: ViewDispatcher start
2017-05-22 19:26:22.103 TestApp[21547:249392] mvx: Diagnostic:   0.05 Setup: Views start
2017-05-22 19:26:22.115 TestApp[21547:249392] mvx: Diagnostic:   0.06 Setup: CommandCollectionBuilder start
2017-05-22 19:26:22.116 TestApp[21547:249392] mvx: Diagnostic:   0.06 Setup: NavigationSerializer start
2017-05-22 19:26:22.117 TestApp[21547:249392] mvx: Diagnostic:   0.06 Setup: InpcInterception start
2017-05-22 19:26:22.117 TestApp[21547:249392] mvx: Diagnostic:   0.06 Setup: LastChance start
2017-05-22 19:26:22.145 TestApp[21547:249392] mvx: Diagnostic:   0.09 Setup: Secondary end
2017-05-22 19:26:22.146 TestApp[21547:249392] mvx: Diagnostic:   0.09 Showing ViewModel ViewModel
2017-05-22 19:26:22.147 TestApp[21547:249392] iOSNavigation: Diagnostic:   0.09 Navigate requested
Thread started: <Thread Pool> #3
Thread started: <Thread Pool> #4
Thread started: <Thread Pool> #5
Thread started: <Thread Pool> #6
2017-05-22 19:26:22.301 TestApp[21547:249392] MvxBind: Error:   0.25 Problem seen during binding execution for binding TouchUpInside for ClickButtonCommand - problem ArgumentNullException: missing source event info in MvxWeakEventSubscription
Parameter name: sourceEventInfo
	  at MvvmCross.Platform.WeakSubscription.MvxWeakEventSubscription`2[TSource,TEventArgs]..ctor (System.Windows.Input.ICommand source, System.Reflection.EventInfo sourceEventInfo, System.EventHandler`1[TEventArgs] targetEventHandler) [0x00017] in D:\git\MvvmCross\MvvmCross\Platform\Platform\WeakSubscription\MvxWeakEventSubscription.cs:47 
  at MvvmCross.Platform.WeakSubscription.MvxCanExecuteChangedEventSubscription..ctor (System.Windows.Input.ICommand source, System.EventHandler`1[TEventArgs] eventHandler) [0x00000] in D:\git\MvvmCross\MvvmCross\Platform\Platform\WeakSubscription\MvxCanExecuteChangedEventSubscription.cs:21 
  at MvvmCross.Platform.WeakSubscription.MvxWeakSubscriptionExtensionMethods.WeakSubscribe (System.Windows.Input.ICom
mand source, System.EventHandler`1[TEventArgs] eventHandler) [0x00000] in D:\git\MvvmCross\MvvmCross\Platform\Platform\WeakSubscription\MvxWeakSubscriptionExtensionMethods.cs:69 
  at MvvmCross.Binding.iOS.Target.MvxUIControlTouchUpInsideTargetBinding.SetValueImpl (System.Object target, System.Object value) [0x0003d] in D:\git\MvvmCross\MvvmCross\Binding\iOS\Target\MvxUIControlTouchUpInsideTargetBinding.cs:67 
  at MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x00093] in D:\git\MvvmCross\MvvmCross\Core\Binding\Bindings\Target\MvxConvertingTargetBinding.cs:64 
  at MvvmCross.Binding.Bindings.MvxFullBinding+<>c__DisplayClass24_0.<UpdateTargetFromSource>b__0 () [0x00025] in D:\git\MvvmCross\MvvmCross\Core\Binding\Bindings\MvxFullBinding.cs:182 
Thread finished: <Thread Pool> #6
The thread 'Unknown' (0x6) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #5
The thread 'Unknown' (0x5) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #4
Thread started: <Thread Pool> #8
Thread started: <Thread Pool> #9
The thread 'Unknown' (0x4) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #8
The thread 'Unknown' (0x8) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #3
Thread started: <Thread Pool> #4
The thread 'Unknown' (0x3) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #9
Thread started: <Thread Pool> #5
Thread started: <Thread Pool> #10
The thread 'Unknown' (0x9) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #5
The thread 'Unknown' (0x5) has exited with code 0 (0x0).
Thread finished: <Thread Pool> #4
Thread started: <Thread Pool> #8
The thread 'Unknown' (0x4) has exited with code 0 (0x0).


I can give you a source code of my test project. I use Fody and MvvmCross, and not hitting breakpoints is in ViewModel.
Comment 3 Vladislav Kosev 2017-05-23 08:15:01 UTC
My breakpoints too are not hit. From the callstack it would seem that the symbols for the iOS project are not loaded. iOS library breakpoints are hit with no problems.
Comment 4 Daniel 2017-05-24 11:41:57 UTC
Breakpoint are not hit on VS 2017
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2017-06-01 03:16:02 UTC
## Cross-referencing note

There is a chance that the underlying issue from Bug 56893 might account for this bug report too even though the output shown in Comment 2 is from an iOS simulator and Bug 56893 is so far only confirmed to affect debugging on iOS devices.




## Possible next step for the reporter of the bug

As a quick experiment, the reporter of this bug and other users watching the report might wish to try the "possible temporary workaround" from Bug 56893, Comment 2 to switch to portable .pdb files and see that is effective for their particular scenarios.

Note that a fix for another potential cause of issues with breakpoints is included in Visual Studio 2017 (26430.12) from May 30 (and XamarinVS 4.5.0.476 for Visual Studio 2015), so updating to that version is also recommended (along with the corresponding Stable channel updates for Mac).

(For users watching this bug, note that this bug will be reserved to track the status of the precise behavior for the original reporter's scenario from Comment 0.  Other scenarios can be tracked in separate bug reports.  Thanks!)
Comment 6 Jose Gallardo 2017-06-21 17:01:37 UTC
Hi Artem,

We have already a fix for the underlying bug mentioned by Brendan.
We do want to confirm if that was the issue here. Can you please share your test project to verify?

Thanks!
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2017-06-21 17:12:09 UTC
> Can you please share your test project to verify?

Since sharing a full project can be tricky to coordinate unless the reporter has a simple test project that they know matches the complete symptoms from the full original project, a couple alternative ways the reporter (@Artem) could help double-check the verification for the original scenario from Comment 0 would be to:

(a) Check if the "possible temporary workaround" from Bug 56893, Comment 2 is also effective for the original scenario from Comment 0 where the reporter observed the issue.

or

(b) Wait for a little bit longer until the next Xamarin "15.3 release" preview is available (tentatively within the next week), and check if that new version resolves the issue for the original scenario from Comment 0.
Comment 8 Joaquin Jares 2017-06-22 12:30:08 UTC
I'm moving this to 15.4 as the window is over for 15.3. The bug is resolved anyway (in theory). We're just keeping it open for user verification.
Comment 9 Jan Nepras 2017-06-22 15:18:23 UTC
I am still facing this bug. I tried all alpha channels on my Windows desktop and then on my Mac. I found out, that it helps to downgrade to mono 4.8.1. So I did it. It worked in Xamarin Studio on Mac. Not in Visual Studio for Mac and for Windows. I've been working on this 4 days. Kinda frustrating.
Comment 10 Brendan Zagaeski (Xamarin Team, assistant) 2017-06-22 15:37:20 UTC
> We're just keeping it open for user verification.
To be precise, as mentioned in Comment 5, this _exact_ bug report remains reserved for possible user verification of the precise behavior for the _original reporter's (Artem's) scenario from Comment 0_.  Other scenarios would need to be tracked in separate bug reports to ensure that each particular root cause is addressed.


> I tried all alpha channels
(a) To help clarify a few details, as mentioned indirectly in Comment 7, the current 15.3 release preview does not yet included the candidate fix for Bug 56893.  It would be necessary to wait for a little bit longer until the next Xamarin "15.3 release" preview is available (tentatively within the next week) to test that candidate fix using the a preview build.

(b) The Alpha channel is in a special circumstance at the moment where it is a few versions _older_ than the Beta channel because it is being used to provide a few early previews of features that aren't yet intended to be included in the Beta versions.  So the most recent preview versions are on the Beta channel, and the next _Beta_ version (to be published tentatively within the next week) would be the best version to check for remaining issues.

See also:
https://releases.xamarin.com/beta-release-15-3-preview-2/
Comment 11 Artem Garkavyi 2017-07-04 11:03:53 UTC
Hi all. I unfortunately cannot check this bug on new version VS now, but I found workaround it is a disabled linker on iOS project. It is allows to use debug in portable projects. And I found out that it is connected with MvvmCross, how it seems to me.
Comment 12 Jose Gallardo 2017-07-05 17:51:32 UTC
Hi Artem,

Can you please clarify?
Can you reproduce the issue with the latest version? (without any workarounds).

Thanks
Comment 13 Joaquin Jares 2017-08-07 14:44:49 UTC
I'm closing this for the moment because it looks like Artem is not being able to reply. Please Artem do reopen if you are still facing this. Also, please do confirm if you reopen is disabling linker helps.

Thanks,
joj