Yes, you can. One option is to use DebuggerDisplayAttribute
The debugger display attributes allow the developer of a type that defines and better understands the runtime behavior of this type, also indicates how this type will look when it is displayed in the debugger.
[DebuggerDisplay("The count value in my class is: {count}")] class MyClass { public int count { get; set; } }
EDIT: After explaining, I realized what you want. You can make your own multi-line renderer, but you probably don't like the way it is done :)
- You need to add the link to
Microsoft.VisualStudio.DebuggerVisualizers.dll . I found it in the list Add Link โ Assemblies โ Extensions - You need to create a new class and inherit the DialogDebuggerVisualizer class. Override the Show method and display the desired content.
- Mark your class as
Serializible - Add a link to your custom document document
Here is a sample code:
using System.Windows.Forms; using Microsoft.VisualStudio.DebuggerVisualizers; [assembly: DebuggerVisualizer(typeof(MyClassVisualizer), Target = typeof(MyClass), Description = "My Class Visualizer")] namespace MyNamespace { [Serializable] public class MyClass { public int count { get; set; } = 5; } public class MyClassVisualizer : DialogDebuggerVisualizer { protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { MyClass myClass = objectProvider.GetObject() as MyClass; if (objectProvider.IsObjectReplaceable && myClass != null) { StringBuilder sb = new StringBuilder(); sb.AppendLine("Here is"); sb.AppendLine("your multi line"); sb.AppendLine("visualizer"); sb.AppendLine($"of MyClass with count = {myClass.count}"); MessageBox.Show(sb.ToString()); } } } }
Then you will see a magnifying glass, and when you click it, the result will look like this: 
source share