Bug 60277 - Broken debugging in cases of mutli-level dependence and reflection (with linking)
Summary: Broken debugging in cases of mutli-level dependence and reflection (with link...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 4.0 (d15-5)
Hardware: PC Mac OS
: --- critical
Target Milestone: 15.7
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2017-10-19 19:11 UTC by Chris Hamons
Modified: 2018-01-12 22:41 UTC (History)
3 users (show)

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


Attachments
Repro (3.55 MB, application/zip)
2017-10-19 19:11 UTC, Chris Hamons
Details


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 or GitHub 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 FIXED

Description Chris Hamons 2017-10-19 19:11:28 UTC
Created attachment 25375 [details]
Repro

An internal customer reported this and I was able to create an synthetic sample that shows the problem (attached).

Steps to reproduce:

- Open attached sln
- Add breakpoints to both TheValue properties (one in each lib project)
- Debug
- Note only one is hit, the other has an empty sad circle because the pdb does not match the dll.
Comment 1 Chris Hamons 2017-10-19 19:13:43 UTC
https://github.com/xamarin/xamarin-macios/pull/2901
Comment 2 Sebastien Pouliot 2018-01-09 20:49:39 UTC
Reverted with https://github.com/xamarin/xamarin-macios/pull/3188 but only in 15.6

It _might_ be (one of) the reason(s) why debugging sometime fails but we cannot reproduce the issues. If that's the case then quite a few people could end up with a (not so helpful) build error.

ref: https://bugzilla.xamarin.com/show_bug.cgi?id=60923

We need a better alternative for 15.7 (it's not reverted in master). Something like a _useful_ warning instead of a _generic_ error. 

Maybe it can be done on top of the existing PR ? or maybe another approach is needed.
Comment 3 Sebastien Pouliot 2018-01-11 16:22:28 UTC
Fixing this, differently, needs to work along
https://github.com/xamarin/xamarin-macios/issues/3200
Comment 4 Sebastien Pouliot 2018-01-11 21:36:01 UTC
I'll double check the attached test case still works once I fix the issue.
Comment 5 Sebastien Pouliot 2018-01-12 21:06:02 UTC
without the fix (e.g. in 15.6) I hit only one breakpoint (bad)

with master/15.7 (original fix) I hit two breakpoints (good, but reverted for other issues)

with PR3203 [1] I hit two breakpoints (good and does not break existing projects)

[1] https://github.com/xamarin/xamarin-macios/pull/3203
Comment 6 Sebastien Pouliot 2018-01-12 22:41:11 UTC
Merged in master with https://github.com/xamarin/xamarin-macios/commit/3a851e2a639206bfef7fa9b22a69e8fd4c5d227c