View .NET collections with the new IEnumerable Debugger Visualizer

Harshada Hole

While debugging .NET code, inspecting a large and complex collection object can be tedious and difficult. Hence, starting from Visual Studio 17.2. Preview 2, we are introducing a new Visualizer, which will help you view IEnumerable objects such as Arrays, List, etc. in a customized tabular view. 

The IEnumerable visualizer will display collections of objects in a table with a row per object and sortable columns for each field and property. 

IEnumerable Table Visualizer

IEnumerable Visualizer



Visualize data with IEnumerable Visualizer

The IEnumerable Visualizer is an extension to the existing Dataset Visualizer Dialog Box – Visual Studio (Windows) | Microsoft Docs. You can access this visualizer by clicking on the magnifying glass icon next to the Value in a debugger variables window or in a DataTips. The icon is available for suitable IEnumerable<T> implementations where T can be simple types like List or Arrays or complex types like dictionaries, encapsulated, etc. 

In the case of complex objects where object properties can be another object, the IEnumerable visualizer will show just the immediate object properties. To view all child properties of the object in a table cell, you can use the “Expand Column” option from the column header’s right-click context menu. If you want to focus on specific columns, you can use the “Hide Column” option or the “Hide Children” option to hide all expanded properties. 

IEnumerable Table Visualizer - Columns

Hide/Expand Columns

If the object being visualized has multiple implementations of IEnumerable, the Visualizer will show the first implementation of the object by default. You can use the drop-down on the top to explore members and fields provided by each implementation.

IEnumerable Table Visualizer - Multiple IEnumerable Implementation

 Multiple IEnumerable Implementation

Sorting and Export

The visualizer also supports column sorting in ascending or descending order. Just click on the column title to sort it. 

Finally, if you are interested in exporting the data from the visualizer, you can use the Export button in the top-right corner. It will open the data in Excel (with more options such as exporting to CSV coming in future releases). 

IEnumerable Table Visualizer - Export

Export & Sort

Let us know what you think!

This is the first step toward creating a streaming data visualization experience while debugging. We are constantly working on improving this feature and adding new capabilities in upcoming releases. We appreciate you taking the time to try our latest features and hope you will provide honest feedback by taking this brief survey.





Discussion is closed. Login to edit/delete existing comments.

  • MgSam 0

    Glad to see you guys working on Visualizers again.

    I had made an extension several years back that was a superior Visualizer for DataTables than the built-in DataSet one. It offered Searching/Filtering using both plain text and a simple OData dialect. It was also non-modal so you could continue debugging while using it. Unfortunately, breaking changes in Visual Studio’s extension API broke the extension and I haven’t picked it up since. It was also quite difficult to make since the Visualizer API is totally separate from the Extension API and there is no built-in functionality for making Visualizers non-modal. I’d really like to see the two APIs unified which would definitely make me take a look at reviving my extension.

    I think what you’ve built here is a good start but the ability to search/filter is critical for these sorts of tools. I also thinking making it non-modal is essential.

    • Harshada HoleMicrosoft employee 0

      Apologies, you had an issue with your extension. We will work with the extension team to understand the problem with both APIs.
      Search/filtering is on the to-do list, so we will have that in upcoming releases.

      • Andrew Stanton 0

        @harshada – please make sure the search/filtering support is not crazy slow like when using the Immediate window.

  • Per-Erik Kristensson 1

    Wow! I did suggest exactly this feature a few years ago, never expected it to be implemented :-). Well done! I did find a minor issue when exporting to Excel. Some characters (like Å) are not properly shown in Excel, it looks like some UTF-8 encoding issue.

    As MgSam suggested, some basic filtering would be nice. But I’m more than happy doing this in Excel.

    Thank you!

    • Harshada HoleMicrosoft employee 0

      We are glad this is helpful. Thank you so much for trying it and bringing up the export issue, we will look into that.
      We are working on improving this feature and adding new capabilities; search/filtering is on the to-do list as well.

  • Francesco Luderin 0

    That’s fantastic! Debugging long enumerables of complex objects just got a big upgrade. I was waiting for this implementation since I joined the preview program. Thank you!

    • Harshada HoleMicrosoft employee 0

      Glad this is helpful.

  • Rand Random 0

    Sure hope the design-team will have a look at it before the final release.
    The UI just screams Windows 98 era to the addition of no dark-theme in a visual studio that has dark-theme enabled.

    Does export to excel work when there is no excel installed on the machine?
    Did you consider export to csv?

    • Harshada HoleMicrosoft employee 0

      Thanks for the feedback.
      Theming and Export to CSV are on our roadmap for upcoming releases.
      Unfortunately, exporting to excel will not work if no excel is installed on the machine.

      • NN 0

        Please also consider making Quick Watch themeable.

  • Reuben Swartz 0

    Wow that looks incredible.

    • Harshada HoleMicrosoft employee 0

      Glad this is helpful.

  • Vaclav Elias 0

    Finally, why it took you so long? I found it essential in my debugging. I don’t have to maintain my extension anymore 🤣, maybe you could add search on the top as well?

    Thank you so much!

    • Harshada HoleMicrosoft employee 0

      Thanks a lot for the wonderful extension, hope this new update will be helpful as well.
      Yes, this is just the first version of the visualizer. we have many more enhancements on the roadmap including Search/Filtering.

  • Josué Rafael Hernández Martínez 0

    This will have dark theme?

    • Harshada HoleMicrosoft employee 0

      Yes, theming this window is on our roadmap.

  • Gonzalo Fernandez 0

    Thanks for this great addition!! More tools for debugging will always be welcome! Congrats

  • Baker, Brian 0

    Very cool! Looking forward to trying this out.

  • FirstSerhii 0


  • Hansjoerg Reister 1

    That is one of the most exciting new features I can think of. Will give it a try ASAP. This could get almost as powerful as the .Dump() extension in LinqPad. What about adding charts? 😜

  • Hamza Ouassil 1

    I tried it the other day, very useful and works like a charm, good job !

  • Diana Boone 0

    Will this work with a Blazor WASM client project? When working with our current project, the debugger does not allow you to look at static variables so we have to use console.writeline statement to see the values.

  • Praveen Potturu 0

    This visualizer needs to handle dictionaries different from a standard IEnumerable. I hope that is also on the roadmap.

  • John Even Pedersen 1

    This is a great start. 👍👍💪
    I can already start using it, but making it non-modal as mentioned by others will be really useful for debugging.

Feedback usabilla icon