0

I am trying to debug a datastream i'm receiving that gets stored into a byte array. The array's length is about 175k though so when i put a breakpoint in and try to unfold the contents in the watch screen of said array in the Visual Studio debugger it will (quite righteously so) not show to contents of the array because it is way too long.

I found this answer for C++ where you can type array, n into the watch and it will show n many entries. But this does not work for C# so i was wondering if there is a C# equivalent to it.

I know i can get around this by making a sub array and copying a block of the original array into that but that's not very efficient, as i have to either make a lot of copies or stop the application every time i want to inspect a different part of the array.

Remy
  • 4,843
  • 5
  • 30
  • 60

1 Answers1

2

You can use the immediate window and linq to take the part of the array you need to see, with filtrers or with (skip/take) methods.