Bug 10586 - Unknown identifier for built in class
Summary: Unknown identifier for built in class
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.6.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Dominique Louis
URL:
Depends on:
Blocks:
 
Reported: 2013-02-22 13:49 UTC by Eric Maupin
Modified: 2013-05-27 15:38 UTC (History)
4 users (show)

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


Attachments
Repro project (13.81 KB, application/octet-stream)
2013-02-22 13:49 UTC, Eric Maupin
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 Eric Maupin 2013-02-22 13:49:41 UTC
Created attachment 3453 [details]
Repro project

Given a simple Activity:

namespace DebugTest1 {
	[Activity(Label = "DebugTest1", MainLauncher = true, Icon = "@drawable/icon")]
	public class Activity1 : Activity {
		protected override void OnCreate (Bundle bundle) {
			var uri = ContactsContract.Contacts.ContentUri;
			base.OnCreate (bundle); // place breakpoint here
		}
	}
}

When breaking into this method, ContactsContract, .Contacts, and .ContentUri will all display "Unknown idnetifier" as their value.
Comment 1 Mikayla Hutchinson [MSFT] 2013-02-22 16:34:20 UTC
What IDE? What version?
Comment 2 Eric Maupin 2013-02-22 16:45:05 UTC
VS2012, X.A 4.6
Comment 3 Mikayla Hutchinson [MSFT] 2013-02-22 17:08:23 UTC
BTW, you can flip the status back to NEW when you provide the needed info.
Comment 4 Dominique Louis 2013-02-26 13:31:54 UTC
Hi Eric,
  I have reproed this in both VS and XS. The both behave the same here.
Once you step over that var uri line, the uri variable tooltip evaluates correctly, but the ContentUri comes back with 
Unknown identifier: ContactsContract.

Michael could this be something in mandroid, or whatever is used to evaluate variables during debugging?


D.
Comment 5 Mikayla Hutchinson [MSFT] 2013-02-26 14:22:03 UTC
Works for me in XS 4.0: http://screencast.com/t/ckyifDYNXA

XS plugs a resolver into the debugger that can resolve the type using the C# completion engine. That means it takes the usings into account. It's possible the VS extension doesn't have one of these, so the debugger is falling back to a dumb lookup, which fails because ContactsContract is not fully qualified.
Comment 6 Dominique Louis 2013-02-26 17:02:51 UTC
Michael,
  You appear to be using XS on Mac. I was testing with XS and VS on Windows and both don't resolve here and I'm using the latest XS build. Could you also confirm that under Windows it works or does not work for you?

I'll have to find out if we can also makes use of a resolver in VS. Does this resolver also work in XS on Windows?

D.
Comment 7 Mikayla Hutchinson [MSFT] 2013-02-26 17:14:17 UTC
What does the locals window show when you're paused?
Comment 9 Jeffrey Stedfast 2013-03-18 13:14:47 UTC
Dominique: The resolver is contained within the NRefactoryExpression*.cs files here:

https://github.com/mono/monodevelop/tree/master/main/src/core/Mono.Debugging/Mono.Debugging.Evaluation