0

Visual Studio 2022 is ignoring the "DebuggerDisplay" attribute for one of my classes, and I would really appreciate help figuring out why. I have several classes using [DebuggerDisplay("{DebuggerString}")] including others inheriting from VM, and all of them correctly display the current value of their respective DebuggerString property during debugging except for this one, which always displays "ImageRefreshTrigger = 0" as the debugger value.

Relevant code snippet looks as follows:

namespace SynthEBD;

[DebuggerDisplay("{DebuggerString}")]
public class VM_SubgroupPlaceHolder : VM, ICloneable
{
   ...
   public int ImageRefreshTrigger { get; set; } = 0;
   public string ID { get; set; }
   public string Name { get; set; }
   ...
   public string DebuggerString
   {
        get
        {
            return ID + ": " + Name;
        }
    }
    ...
}

Full code is available at the GitHub page. Thanks in advance for advice!

A Piranha
  • 35
  • 4
  • 2
    Rather than redirecting us to code that is mostly unrelated to the problem, it would be much better if you'd provide a [mcve] - two classes, one of which is shown correctly in the debugger and one of which isn't, along with a tiny console app that's just enough to then provide a screenshot of the debugger. Then we can reproduce the problem easily. – Jon Skeet Sep 02 '23 at 07:41
  • Thanks - in starting to draft the minimal example, I realized that renaming `ImageRefreshTrigger` to any other name would allow `DebuggerDisplay` to function properly. I'm assuming this is some sort of local cacheing or configuration issue, although cleaning my solution and deleting its bin and obj folders did not resolve the problem. Thanks for the reminder to reduce to basics. – A Piranha Sep 02 '23 at 08:40

0 Answers0