How do I view a Span<Byte> in the Debugger?
I'm porting some C code over to C# and making use of Span<Byte>
and ReadOnlySpan<Byte>
, but Linqpad 's debugger doesn't show me the contents of the span:
See the Locals tab, and see how the expanded Results View is empty, despite the Span<Byte> bytes
being backed by a normal Byte[]
.
Comments
The easiest thing would probably be to add a new watch in the Watch tab and use
bytes.ToArray()
to see the contents of the byte array.Or just click on the blue Dump link.
This should now be fixed in 8.4.9.