Flatten inherited members in Visual Studio's Watch window?

前端 未结 2 608
误落风尘
误落风尘 2020-12-30 23:39

Is there some way to make the Watch window display all inherited properties and fields in one long flat list, rather than hidden behind a nested \"base\" node?

I\'m

2条回答
  •  离开以前
    2020-12-30 23:50

    Not as such. You see, it is a feature! The ability to see where a property comes from is important most of the time.

    I understand your pain though. There are some work arounds. First, you can just put the object.property in the watch window. This will just display the property you are looking for. It is great for digging into a specific property but not so much for getting all the others.

    You can also try (BaseClass)object. This will cast it to the base object that contains the property (properties?) you are looking for. Again it is great for looking a a specific subset of properties but completly hides all the others.

    Good luck and good hunting.

提交回复
热议问题