VisualD - how to view runtime type of class in debbuger?
Michal Minich via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Thu Jun 4 05:36:09 PDT 2015
Please consider code
class C { int c = 1; }
class D : C { int d = 2; }
int main() {
C c = new D();
return c.d;
}
when paused in debugger on the return statement the locals
windows shows variable c as of type C. Only way to be able to
view data of D instance was when I used Mango engine and used
locals "cast(main.D)c"
This has following issues:
- only supported in Mango
- one must know the runtime type of variable, it is not
displayed by debugger
- it must be manually written into watches window
Is there a way
- to achieve the same (or better) effect using Visual Studio
debugger
- possibility to display runtime type (without putting manually
some string variable with type name into every class)
Thank you.
More information about the Digitalmars-d-ide
mailing list