Bug 12498 - Debugger tooltips on property initializers not working
Summary: Debugger tooltips on property initializers not working
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2013-05-31 16:09 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-06-07 01:19 UTC (History)
1 user (show)

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 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:

Description Mikayla Hutchinson [MSFT] 2013-05-31 16:09:07 UTC
Debugger tooltips on property initializers don't work:

Comment 1 Jeffrey Stedfast 2013-05-31 17:10:01 UTC
hmmm, this will need NRefactory fixes because I seem to have no way of finding the member's instance variable name from the MemberResolveResult's TargetResult property (or any other property afaict).

The MemberResolveResult's TargetResult property is an InitializedObjectResolveResult, but GetDefinitionRegion() returns an empty region and so there's no way to get the instance name :-(

I've committed some logic that should hopefully make this work once Mike fixes NRefactory.
Comment 2 Mike Krüger 2013-06-07 01:19:32 UTC
Works for me (btw. the tooltips in the editor work - therefore the resolving works there).

class TestClass
	public int Foo, Bar;

	public static void Main (string[] args)
		new TestClass {
			Foo = 1,
			Bar = 2

Resolve result for "Bar" is:

[MemberResolveResult [Field TestClass.Bar]]

And the GetDefinitionRegion() returned [DomRegion FileName=/Users/mkrueger/Projects/BugTest/BugTest/Test.cs, Begin=(5, 18), End=(5, 21)] for me.