Sergii
Sergii

Reputation: 749

Get question mark instead property name and value in Debug Mode in Visual Studio

My issue is: during Debug Mode in Visual Studio I can not see property name and it value. Any suggestions? UPD This bug/feature is reproducible in college PC. enter image description here

enter image description here

enter image description here

UPD(15.06.2012)

The base class is placed to separated lib. Base class is abstract. And... Two times Debug was working fine, after making changes in source file (in screen-shots) and then running the project.

Please notice that Immediate window can not evaluate this expression.

MailProcessingViewModelContext inherits that base class that I have mentioned in the top of UPD.

Upvotes: 17

Views: 5540

Answers (9)

Tim
Tim

Reputation: 187

For me, this happened when I had a getter property in a class model pointing to itself. It was a copy paste error, notice the property name is ShouldNotProcess, and in the getter it's returning itself. The return was supposed to be: return !this.ShouldProcess;

public bool ShouldNotProcess
{
    get { return !this.ShouldNotProcess; }
}

Upvotes: 1

MegaMatt
MegaMatt

Reputation: 23783

It's a bug in Visual Studio that's caused when you scroll through the properties list with a mouse. Click the down arrow at the bottom of the menu instead.

Upvotes: 13

Fredrik Jansson
Fredrik Jansson

Reputation: 11

This would happen if you were debugging an ASP.NET wizard and wanted to check a collection of something, all elements in the collection that are in the current wizard step (current context) would be visible while the others are there but not in context just now hence marked as questionmarks -> ?

Maybe it could be something like that in your case. I guess it could be the same scenario

Upvotes: 1

mreyeros
mreyeros

Reputation: 4379

Not sure if this is the case in your situation, but here is a post with a similar issue. Hope it helps

Upvotes: 0

Matt Roberts
Matt Roberts

Reputation: 26897

Make sure you're running in debug mode, I know I'm probably stating the obvious there. Also, check that expression you're evaluating - is it right? Are you casting to the right object. Finally, is the assembly that contains the class you are looking at included as a project in the solution, or just referenced as an external assembly? Make sure it's part of the sln.

If it's recreatable on another copy of visual studio then I'd guess it's not a problem with Visual Studio, but the object you are looking at.

Upvotes: 0

Estefany Velez
Estefany Velez

Reputation: 328

Is there a possibility that the object you are referring to belongs to another project (library template) and you added it as a file reference and not project reference?

Please share the details about the structure of the projects in your solution. Also the location of the class you are trying to access.

Upvotes: 0

Markus Engelhardt
Markus Engelhardt

Reputation: 11

As somebody on top already mentioned, you need the debugging symbol files (.pdb's) for every dll that you are using which is not your code, otherwise VS can't look 'inside'.

and if it's obfuscated you won't see anything at all

Upvotes: 1

dilip kumbham
dilip kumbham

Reputation: 709

You cannot access these menu items or display these windows in design mode. To display these menu items, the debugger must be running or in break mode.

REF:

http://msdn.microsoft.com/en-us/library/bhawk8xd

Upvotes: 0

Alex Gelman
Alex Gelman

Reputation: 534

Are you trying to debug your own code or someone else's?

If it's not your code, the code has probably been obfuscated so you cannot see the private members or use reflector to reverse engineer it.

This also might happen if you're using a trackpad to scroll through the member list. Try using the keyboard instead.

Upvotes: 0

Related Questions