Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebuggerDisplayAttribute doesn't work on property in Visual Studio 2015 debugger #4134

Open
dotnetjunkie opened this issue Jul 27, 2015 · 7 comments

Comments

@dotnetjunkie
Copy link

In Visual Studio 2015 Community, the debugger doesn't use DebuggerDisplayAttributes anymore when placed on properties. The following class demonstrates the problem:

[DebuggerDisplay("Foo")]
public class Test
{
    [DebuggerDisplay(value: "Bar")]
    public Type Property { get { return typeof(object); } }
}

When hovering over an instance of Test in the debugger of Visual Studio 2013 Community edition, everything works as expected:

vs2013debugger

But if we do the same in Visual Studio 2015 Community edition, we get the following result:

vs2015debugger

@ManishJayaswal
Copy link
Contributor

@KevinH-MS moving to 1.2

@noam-honig
Copy link

Seen the same problem. I seems that when you set the DebuggerDisplay attribute to a property, it gets associated with the class instead.
image

This is very important for me as I use it a lot in classes that we provide

@ManishJayaswal ManishJayaswal modified the milestones: 1.2, 1.3 Jan 27, 2016
@ManishJayaswal ManishJayaswal modified the milestones: 2.0 (RC), 1.3 May 6, 2016
@BradleyUffner
Copy link

This bug seems to still be present in Visual Studio 2015 with Update 2 (14.0.25123.00 Update 2).

@ManishJayaswal ManishJayaswal modified the milestones: 2.0 (RC), 2.1 Oct 14, 2016
@jinujoseph jinujoseph modified the milestones: 15.1, 15.later May 22, 2017
@jinujoseph jinujoseph modified the milestones: 15.6, Unknown Nov 3, 2017
@boop5
Copy link

boop5 commented Jun 6, 2021

This is still a relevant issue in vs2019
image

Visual Studio
image

@jcouv
Copy link
Member

jcouv commented Sep 6, 2023

This came up recently in #69827. Do we have a sense of what work would be needed to improve this, and how involved it would be?

@JamesNK
Copy link
Member

JamesNK commented Sep 6, 2023

If this is the agreed solution for fixing #69827, can it be moved out of backlog? There are a bunch of places I'd like to use this to improve debugging in .NET and ASP.NET Core.

cc @tmat

@jcouv jcouv added Retriage untriaged Issues and PRs which have not yet been triaged by a lead and removed Retriage untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 7, 2023
@Canabale
Copy link

I am currently facing the same issue.
Microsoft Visual Studio Professional 2022 (64-bit)
Version 17.11.5

Microsoft .NET Framework
Version 4.8.09032

Does anyone know a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests