Bug 35663 - Debug breakpoint not being hit - Assembly Reference / Visual Studio
Summary: Debug breakpoint not being hit - Assembly Reference / Visual Studio
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-08 09:16 UTC by Wiyono Aten
Modified: 2015-12-02 23:15 UTC (History)
2 users (show)

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

Repro project - TestAndroidAppWithAssemblyReference.zip (50.46 KB, application/x-zip-compressed)
2015-11-08 09:16 UTC, Wiyono Aten

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 for Bug 35663 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Wiyono Aten 2015-11-08 09:16:12 UTC
Created attachment 13724 [details]
Repro project - TestAndroidAppWithAssemblyReference.zip

(Note: I have just tried the latest RC1. However, it still does not fix this issue.)

So I’m seeing an issue, where if I reference a library as an Assembly Reference (dll), I can’t get the debug breakpoint on its source (nor stepping in) being hit. However, if I reference it as a Project Reference, it would work. Now I have tested that this actually works in Xamarin Studio (when having debug framework code setting enabled), but not in Visual Studio (even when similarly having debug .NET Framework code setting enabled there).

This is important for me as I develop libraries which I also consume in my application project. It is not ideal setup if I have to use those libraries as project references as it would tie the projects too much and also that those libraries are going to be packaged in standalone way (ie. NuGet). At the same time, I need debugging to work as I develop both the library and app projects together.

I have made a simple repro project, attached. Please open using Visual Studio, and ensure in Debug > Options > Debug .NET Framework code setting is enabled.

Please note that initially you’d have the DummyClassLibrary project added to the solution, although the app project actually references the Debug dll, and not the project reference. I demonstrated it this way because I have found that doing this would actually get the debugging to work for some reason! (but note this wouldn’t be an ideal solution for me). Put a breakpoint inside the class in the library, and start debugging. You’ll see the breakpoint being hit. 

Now, remove that DummyClassLibrary from the solution. Open the class file and put a breakpoint there in the library. Start debugging. Now you’ll see that the breakpoint not being hit!

I believe this is a bug. Otherwise please let me know if this is a known issue and there is a known workaround/fix?

I have tried searching around the Web and couldn’t find anything specifically relating to this assembly reference debugging issue on VS. I’m not having a productive workflow because of this currently.
Comment 1 Al Clark [MSFT] 2015-11-10 09:32:33 UTC
I've tried to replicate your bug but even after removing the DummyClassLibrary I am still hitting the breakpoints.

Could you please confirm your version information?

Visual Studio
"Help -> About Microsoft Visual Studio -> Copy Info [button]"
Comment 2 Wiyono Aten 2015-11-10 12:25:45 UTC
Interesting that you cannot! So here's my VS info copy:

Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Community

Visual Basic 2015   00322-20000-00000-AA226
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA226
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA226
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-20000-00000-AA226
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

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

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Visual C++ for Cross Platform Mobile Development   1.0
Visual C++ for Cross Platform Mobile Development

Visual Studio Tools for Universal Windows Apps   14.0.23309.00 d14oob
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 (90e1af2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (9d7074e)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (9ce9e8b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 Wiyono Aten 2015-11-11 16:25:33 UTC
Added required info.
Comment 4 Wiyono Aten 2015-11-24 16:46:26 UTC
So any news regarding this issue yet please?
Comment 5 Wiyono Aten 2015-12-02 23:15:58 UTC
This is disappointing, after almost a month now there is no follow up on this. Not even a single reply. I'm not sure if this is intentionally being ignored or what for whatever reason, but I'd value some response here please.