Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do these Visual Studio debug icons means?

I have a class with a bunch of properties, the class is not inheriting or implementing anything.

Why do the two properties (in the red squares below) have a different icon to the other properties?

What does the icon represent? enter image description here

This is what the class looks like:

enter image description here

As you can see, CompanyID and CompanyName are also public properties, however EAP which is a public property does not have the same icon.

If the value of the property is not null, the wrong icon is used, if the value is null, then the correct wrench icon is used.

enter image description here

I'm using VS Enterprise 2017, version 15.9.15.

like image 671
David Klempfner Avatar asked Sep 16 '25 07:09

David Klempfner


2 Answers

This was reported here on the Visual Studio Developer Community page.

Quoting the bug report:

Given this property:

public int? Port { get; set; }

In the debugger I see a box with a heart next to it (ie. the "Field or Variable" icon together with a "Friend/Internal" signal icon).

Surely it should be a wrench icon (for "Property") and no signal icon, given the public accessibility.

According to this page, a fix was released on/around the 18th of June. (Edit: It isn't fixed!)

If this is still in the latest version, I recommend posting a new bug report on the same page (or by clicking the feedback button in Visual Studio and selecting "Report a problem"):

enter image description here

As for what the icon means, you can check Class View and Object Browser Icons, which identifies it as a field/variable (box) and internal (heart).

Edit: I just tested this for myself on Visual Studio 2017 Enterprise v15.9.17 and it's still presenting: enter image description here

As such, I've reported a new issue here.

like image 87
DiplomacyNotWar Avatar answered Sep 17 '25 20:09

DiplomacyNotWar


The icon itself means friend/internal (heart) field/variable (blue cuboid).
See icon documentation here.
Which is odd because EAP is clearly neither of those things.

The only noticeable thing different about those two properties is that they are nullable value types.
I wonder if it's a weird side effect of that producing the wrong icon?

like image 42
Ross Gurbutt Avatar answered Sep 17 '25 20:09

Ross Gurbutt