Well, I just tested it and it works with my simple program. I also thought I had a possible explanation, but testing shows that it wasn't what I thought (info below code).
First, here's the code that works:
using System;
using System.Diagnostics;
using System.Collections.Generic;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Program p = new Program();
Console.Out.WriteLine(p.Name); // breakpoint here
}
private String _Name = String.Empty;
[DebuggerDisplay("Name: {_Name}")]
public String Name
{
get { return _Name; }
set { _Name = value; }
}
private IList<String> _Names = new List<String>();
[DebuggerDisplay("Names: {_Names.Count}")]
public IList<String> Names
{
get { return _Names; }
set { _Names = value; }
}
}
}
What I thought was that the collection class that you retrieve from FetchChildrenFromDB method had its own DebuggerDisplay attribute attached to it, and it took priority. But that's not it. I implemented a dummy IList class with that attribute attached to it, and the one attached to the property still took priority.