www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23478] New: Debugging experience with anonymous classes is

https://issues.dlang.org/show_bug.cgi?id=23478

          Issue ID: 23478
           Summary: Debugging experience with anonymous classes is pretty
                    bad
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: visuald
          Assignee: nobody puremagic.com
          Reporter: msnmancini hotmail.com

Basically, I had an anonymous class defined inside a function:

```d
class A
{
    string myTestString;

    this(string str)
        {
        myTestString = str;
        }
    void tester()
    {
        auto c = new class ("Opps") A
        {
            int a = 100;
            int b = 200;
            this(string str){super(str);}

            void testB()
            {
                //Put breakpoint here.
                //On Autos tab, you'll notice there is only "this", and it does
not show any of its properties. Not a, b, nor myTestString.
                //Locals and watch does not work too. `this` shows memory
address, `this.a` - not found, `this->a` - not found
                a+= 100;
            }
        };
        c.testB();

    }
}


void main()
{
    A a = new A("Hello My Test");
    a.tester();
}
```

--
Nov 11 2022