View data with the Tabular visualizer - Visual Studio (Windows) (original) (raw)

While you are debugging in Visual Studio, you can view large collection objects with the built-in tabular visualizers. The visualizer shows data in a tabular view with one row per object and sortable columns for each field and property.

There are two types of tabular visualizers. The DataSet visualizer allows you to view the contents of a DataSet, DataTable, DataView, or DataViewManager. The IEnumerable visualizer allows you to view objects such as Arrays, List, etc.

To open the visualizer, you must be paused during debugging.

You can access the visualizer by clicking on the magnifying glass icon that appears next to the Value for one of those objects VisualizerIcon in a debugger variables window or in a DataTip.

Screenshot of Open an IEnumerable visualizer.

DataSet visualizer

The DataSet Visualizer allows you to view the contents of a DataSet, DataTable, DataView, or DataViewManager object.

Screenshot of View the DataSet visualizer data.

IEnumerable visualizer

Starting in Visual Studio 2022, you can view IEnumerable collections in a tabular view.

The IEnumerable visualizer helps explore large collection objects in a more streamlined way. The visualizer supports IEnumerable collections where the object type (T) can be simple types or complex types like dictionaries.

Screenshot of View the IEnumerable visualizer data.

You can use the right-click context menu to customize the view:

Modify the expression in the IEnumerable visualizer

Starting in Visual Studio 2022 version 17.11, you can directly change the Expression textbox for the IEnumerable visualizer with a modified LINQ expression. The visualizer data gets updated, reflecting the data change resulting from your new query.

Screenshot of view the visualizer data and edit the expression.

Starting in Visual Studio 2022 version 17.12 Preview 3, you get IntelliSense support to help you edit the expression.

Starting in Visual Studio 2022 version 17.13 Preview 2, you can get inline AI assistance to edit the LINQ expression. If you have Copilot activated, click the GitHub Copilot sparkle icon GitHub Copilot sparkle icon to open the inline Copilot Chat.

Screenshot of Copilot button to get help to edit the expression.

You can describe your query in natural language, and GitHub Copilot will generate the corresponding LINQ query. To apply LINQ query filtering to the visualizer, press Enter.

After at least one LINQ query has been generated by GitHub Copilot, you can choose to select the Continue in Chat button. This action opens a dedicated GitHub Copilot Chat window where you can refine your query, ask follow-up questions, view LINQ syntax examples, or explore alternative approaches in more detail. To apply a suggested LINQ query to the visualizer, use the Show in Visualizer button in the chat.

Filter, sort, and export visualizer data

Screenshot of View the visualizer data filter.