Skip to content

[Bug] Debugger Watch window doesn't recognize variables below anonymous struct #2347

@gopakumar-gg

Description

@gopakumar-gg

Watch window is not able to see the variable y. It says 'Identifier not found'.

using System;
namespace BeefTest;
class Sample
{
    using struct
    {
        public int x = 1;
    }wrapper;
    
    int y = x; // y not detected by Watch Window

    public this()
    {
        Console.WriteLine($"{x}, {wrapper.x}, {y}");
    }
}

class Program
{
    public static void Main()
    {
        Sample s = scope .();
    }
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions