Open kbaladurin opened 6 years ago
PTAL @sandreenko @davidwrighton
Also gc, non-gc and thread statics are represented by corresponding artificial static members. Why was this way chosen? I think without such grouping debugging will be more comfortable.
How can I get value of the class's static member in VS?
This isn't implemented yet. Currently the only way to inspect these is to look at the symbol and interpret the bytes manually.
Also gc, non-gc and thread statics are represented by corresponding artificial static members. Why was this way chosen?
Thread statics would have to be special no matter what. We distinguish between GC and non-GC statics for perf reasons. GC statics are allocated on the GC heap and if we were to lump them together, all of them would need to be on the GC heap. Non-GC static fields can be accessed faster because their address is known at compile time. GC static bases need to go through indirections because GC can move them around.
To provide a nice debugging experience for statics, we'll likely need to build a small thing on top of what native debuggers provide out of the box. It might be possible with some NatVis magic and extra debug records, but I haven't really looked into that.
@MichalStrehovsky thank you!
How can I get value of the class's static member in VS? Sample:
Result (Immediate Window):
Thank you!