-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpanBytes invalid output in debbuger #1407
Comments
I spent some time looking into this. Unfortunately I'm not sure where to find the relevant code so I've been focused on reproducing. This appears to impact an class with an indexer that doesn't derive from var testString = "abc";
Console.WriteLine($"string [0] {testString[0]}, [1] {testString[1]}, [2] {testString[2]}"); This simple test class will always display 0 as well: public class TestIndexer
{
public int this[int index] => index;
} And this class will fail to retrieve a value at all (presumably becase 0 to being passed to the indexer): public class TestCharIndexer
{
public char this[char index] => index;
} Long story short the issue definitely appears to be related with how the indexer is being parsed (or not parsed). |
Seems that our debugger is having a hard time figuring out what it the indexer... |
Tool
Visual Studio extension
Description
When using "Watch" or "Immediate" window SpanByte indexer is returning invalid data (always for first index?).
How to reproduce
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
The text was updated successfully, but these errors were encountered: