Putting the Visual into the Visual Studio Debugger

General, 0


You’ve hit your Visual Studio breakpoint, opened the watch window and you’re looking at a wall of nested collections and object graphs. You know the data you want is in there, but digging it out of the built-in data table UI feels like the “doing it the hard way” part of an infomercial. Now, imagine being able to shape your data the way that makes it easiest to understand and debug, limited only by your imagination (and time, of course). In this session, we’ll take a look at the Visual Studio Debugger Visualizer feature, available in all version of Visual Studio (even the free one!) that lets you create your own graphical display of your .NET data structures while debugging. Shape the data the way you want to make it easier to digest – hide unimportant info, quickly expose deeply nested elements, compare large object graphs, or even instantly search Stack Overflow for help with an Exception. Display it in whatever way is best for your data and your understanding of it, act on the data and even modify it from your custom view. We’ll talk through the options available to you, some of the limitations, and security risks/considerations involved. This session doesn’t require much deep knowledge of .NET, but the examples will primarily be in C#, WinForms and WPF. You don’t need to know any of those beyond what you can Google or find on Stack Overflow, though the results will be useful to novices and well-weathered developers alike.