Dear ladies and sirs.
I know that this attribute should work in C# and yet, in my case it does not.
I have a class with a lazy property Children. Accessing this property may have a side effect of roundtripping to the server. So, naturally, I do not want this to happen when I just watch it in the debugger watch window.
Omitting all the ...
Hello,
I have a descendant of DataTable that has the DebuggerDisplay attribute defined. The default visualizer for DataTable is removed when I add the DebuggerDisplay attribute. If I remove the DebuggerDisplay attribute, the DataTable visualizer returns. I want the default DataTable visualizer and my override for DebuggerDisplay.
Do y...
When we must use DebuggerDisplay Attributes? What is the advantage of using this?
...
I have a number of classes that are decorated with DebuggerDisplayAttribute.
I want to be able to add trace statements to Unit Tests that will display instances of these classes.
Does there exist a method in the .NET Framework that will display an object formatted using DebuggerDisplayAttribute (or fall back to using .ToString() if no ...
Hey all,
There are two ways I know of to increase the usefulness of debugging information so you don't see {MyNamespace.MyProject.MyClass} in the debugger. These are the use of the DebuggerDisplay attribute and the ToString method.
[DebuggerDisplay("Name = {Name}")]
public class Person
{
public string Name;
}
or
public class Pe...
I was wondering if it is possible to have the debugger display be the text for the class in the PropertyGrid?
I cant seem to find this answer anywhere.
Here is an example of what I have.
[DebuggerDisplay("FPS = {FPS}")]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class DebugModule : Module
{
public int FPS {get; set...
I am looking for a good concrete example where it is clearly desirable to override ToString() with something, but to use a [DebuggerDisplay(...)] custom attribute to display something else in the debugger?
...