Create custom views of data in the Visual Studio debugger (C#, Visual Basic, C++)
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
The Visual Studio debugger provides many tools for inspecting and modifying the state of your program. Most of these tools function only in break mode.
Create custom views of data in variable windows and DataTips
Many of the debugger windows, such as the Autos and Watch windows, allow you to inspect variables. You can customize how C++ types, managed objects, and your own types are shown in the debugger variable windows and in DataTips. For more information, see the following articles:
Create custom visualizers
Visualizers enable you to view the contents of an object or variable in a meaningful way. In the Visual Studio debugger, a visualizer refers to the different windows that you can open using the magnifying glass icon. For example, the HTML visualizer shows how an HTML string would be interpreted and displayed in a browser. You can access visualizers from DataTips, the Watch window, the Autos window, and the Locals window. The QuickWatch dialog box also provides a visualizer. For more information:
- To create a visualizer for .NET objects, see Custom visualizers.
- To create a visualizer for C/C++ objects, see UIVisualizer element within the Natvis documentation. Also, see the C/C++ custom visualizer sample or the SQLite native Debugger Visualizer sample.