{"id":237616,"date":"2022-04-21T11:00:19","date_gmt":"2022-04-21T18:00:19","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=237616"},"modified":"2022-04-25T09:33:19","modified_gmt":"2022-04-25T16:33:19","slug":"view-net-collections-with-the-new-ienumerable-debugger-visualizer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/view-net-collections-with-the-new-ienumerable-debugger-visualizer\/","title":{"rendered":"View .NET collections with the new IEnumerable Debugger Visualizer"},"content":{"rendered":"<p><span data-contrast=\"none\">While debugging .NET code, inspecting a large and complex collection object<\/span> <span data-contrast=\"none\">can <\/span><span data-contrast=\"none\">be tedious and difficult<\/span><span data-contrast=\"auto\">. 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 <\/span><span data-contrast=\"none\">customized <\/span><span data-contrast=\"auto\">tabular view.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">The IEnumerable visualizer will display collections of objects in a table with a row per object and sortable columns for each field and property.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-237617\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/a-screenshot-of-a-computer-screen-description-aut.gif\" alt=\"IEnumerable Table Visualizer \" width=\"2300\" height=\"1364\" \/><\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 10pt;\">IEnumerable Visualizer<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\" target=\"_blank\">Download Visual Studio 2022 Preview<\/a><\/div><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"font-size: 18pt;\"><strong>Visualize data with IEnumerable Visualizer<\/strong><\/span><\/h2>\n<p><span data-contrast=\"none\">The <\/span><span data-contrast=\"none\">IEnumerable<\/span><span data-contrast=\"none\"> Visualizer is an extension to the existing <\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/debugger\/dataset-visualizer-dialog-box?view=vs-2022\"><span data-contrast=\"none\">Dataset Visualizer Dialog Box &#8211; Visual Studio (Windows) | Microsoft Docs<\/span><\/a><span data-contrast=\"auto\">. <\/span><span data-contrast=\"none\">You can access this visualizer by clicking on the magnifying glass icon next to the Value in a debugger variables window or in a <\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/debugger\/view-data-values-in-data-tips-in-the-code-editor?view=vs-2022#:~:text=Display%20a%20DataTip,current%20value%20of%20the%20variable.\"><span data-contrast=\"none\">DataTips<\/span><\/a><span data-contrast=\"none\">.<\/span><span data-contrast=\"none\"> The icon is available for suitable IEnumerable<\/span><span data-contrast=\"auto\">&lt;T&gt; implementations where T can be simple types like List or Arrays or complex types like dictionaries, encapsulated, etc.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">In the case of complex objects where object properties can be another object, the <\/span><span data-contrast=\"none\">IEnumerable<\/span><span data-contrast=\"none\"> visualizer will show just the immediate object properties. T<\/span><span data-contrast=\"auto\">o view all <\/span><span data-contrast=\"none\">child properties of the object in a table cell,<\/span><span data-contrast=\"auto\"> you can use the \u201cExpand Column\u201d option from the column header&#8217;s right-click context menu. If you want to focus on specific columns, you can use the \u201cHide Column\u201d option or the \u201cHide Children\u201d option to hide all expanded properties<\/span><span data-contrast=\"none\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-237618\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image.gif\" alt=\"IEnumerable Table Visualizer - Columns \" width=\"2300\" height=\"1455\" \/><\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 10pt;\">Hide\/Expand Columns <\/span><\/p>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-237619\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image.jpeg\" alt=\"IEnumerable Table Visualizer - Multiple IEnumerable Implementation \" width=\"2300\" height=\"1198\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image.jpeg 1390w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image-300x156.jpeg 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image-1024x533.jpeg 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/word-image-768x400.jpeg 768w\" sizes=\"(max-width: 2300px) 100vw, 2300px\" \/><\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 10pt;\">\u00a0Multiple IEnumerable Implementation <\/span><\/p>\n<h3><span style=\"font-size: 14pt;\">Sorting and Export<\/span><\/h3>\n<p><span data-contrast=\"none\">The visualizer also supports column sorting in ascending or descending order. Just click on the column title to sort it.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">Finally, if you are interested in exporting the data from the visualizer, <\/span><span data-contrast=\"none\">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).<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-237620\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2022\/04\/a-screenshot-of-a-computer-screen-description-aut-1.gif\" alt=\"IEnumerable Table Visualizer - Export \" width=\"2300\" height=\"1391\" \/><\/p>\n<p style=\"text-align: center;\"><span style=\"font-size: 10pt;\">Export &amp; Sort<\/span><\/p>\n<h2><span style=\"font-size: 18pt;\"><strong>Let us know what you think!<\/strong><\/span><\/h2>\n<p>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 <a href=\"https:\/\/developercommunity.visualstudio.com\/search?space=8&amp;q=%5BIEnumerableVisualizer%5D&amp;ftype=idea&amp;stateGroup=active\">upcoming<\/a> releases. We appreciate you taking the time to try our latest features and hope you will provide honest feedback by taking this brief survey.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/www.surveymonkey.com\/r\/L8ZFNMH\" target=\"_blank\">Share Your Feedback<\/a><\/div><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.\u00a0 The IEnumerable visualizer will display collections of objects [&hellip;]<\/p>\n","protected":false},"author":26573,"featured_media":237671,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6793,9,6839,6815],"class_list":["post-237616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-debugger","tag-debug","tag-developer-productivity","tag-visual-studio-2022"],"acf":[],"blog_post_summary":"<p>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.\u00a0 The IEnumerable visualizer will display collections of objects [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/237616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/26573"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=237616"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/237616\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/237671"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=237616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=237616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=237616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}