Skip to content

SpanBytes invalid output in debbuger #1407

Open
@torbacz

Description

@torbacz

Tool

Visual Studio extension

Description

When using "Watch" or "Immediate" window SpanByte indexer is returning invalid data (always for first index?).

image

How to reproduce

  var bytes = new byte[] { 10, 20 };
  var spanBytes = new SpanByte(bytes);

  Console.WriteLine($"Array: [0] {bytes[0]} {bytes[1]}");
  Console.WriteLine($"Span: [0] {spanBytes[0]} {spanBytes[1]}");

Place breakpoint on last line and check "watch" window for spanBytes[1] and spanBytes[0]. Both returns "10", but [1] should be 20.

Expected behaviour

SpanBytes should reflect the same values in both console and watch window

Screenshots

No response

Aditional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions