Visual Studio Immediate Window: How to See More Than the First 100 Elements

I am trying to see the properties of an object with more than 300 properties in the Immediate Window of Visual Studio 2005. Only the first 100 elements are displayed, followed by this header:

< More... (The first 100 of 306 items were displayed.) > 

I try to see the rest of the objects, but I can’t understand.

I understand that I could see them in the viewport, but this is not the same.

+62
debugging visual-studio immediate-window
Nov 23 '09 at 20:32
source share
4 answers

I know that this was almost many years ago, but today I came across this. Sometimes it’s useful to see the list in the nearest window rather than looking in the clock window. You can easily see more results than the first 100 using:

 yourList.Skip(100).ToArray() 

What really doesn’t take long to write and work well was good for me.

+38
Dec 08 '11 at
source share

The direct window is designed for quick viewing. If you want to see more detailed information, you will need to view it in the viewing window or in the quick viewing window.

Another option is to write Visual Studio AddIn, which works similarly to the Immediate Window, but has more options.

+14
Jan 13 '10 at 4:29
source share

I know it's late. However, if you add your object to the viewport. Expand the properties where everything is displayed. Then Ctrl-A and Copy. You can then insert excel to get an ordered list of properties and their values.

+10
Sep 22 '14 at 13:56 on
source share

I always create an extension method to export objects to xml with such debugging. This is very useful for troubleshooting data problems with objects. Here is what I use:

 public static void SerializeToXML(this object entity) { System.Xml.Serialization.XmlSerializer writer = new System.Xml.Serialization.XmlSerializer(entity.GetType()); System.IO.StreamWriter file = new System.IO.StreamWriter(string.Format(@"{0}\{1}.xml", Directory.GetCurrentDirectory(), entity.GetType().Name)); writer.Serialize(file, entity); file.Close(); } 

This is not 100% complete proof, but most of the time it is perfect. It will create an xml file in the application directory with the object name as the file name. In the next window, you can simply enter the name of the .SerializeToXML () object.

like this: myList.SerializeToXML ()

+3
Apr 28 '15 at 20:07
source share



All Articles