如何让VS调试器显示对象成员的类型名称? [英] How do I get the VS debugger to display the type name of an object member?
问题描述
Visual Studio autoexp.dat语法允许您使用特殊格式<,t>
,如果你有很多派生类型,这是非常有帮助。从语法上,我假设你可以为成员做同样的事情,例如< member,t>
,但是当我尝试预览只显示
The Visual Studio autoexp.dat syntax allows you to display ‘the name of the most-derived type of the object’ with the 'special format' <,t>
, which is very helpful if you have lots of derived types. From the syntax, I assumed that you could do the same thing for members, such as <member,t>
, but when I try that the preview only shows ???
有没有办法在预览中显示成员类型的名称?
Are there ways to display the name of a member’s type in the preview?
我想能够在 [autoexpand]
部分, code> [visualizer] 节(对于不同的对象当然)。
I’d like to be able to do it in the [autoexpand]
section, and also in the [visualizer]
section (for different objects of course).
推荐答案
我找到了一种方法,但它不是一个非常优雅的解决方案:
I have found a way to do it, but it's not a very elegant solution:
为包含<,t>
指令的成员类型写入[AutoExpand]条目。然后,当您用< member>
显示成员时,它将显示与成员类型相同的信息,包括其类型名称。
Write an [AutoExpand] entry for the member type which includes the <,t>
directive. Then when you display the member with <member>
it will show the same information as it does for the member type on its own, including its type name.
这不是一个很好的解决方案,因为我真的不想在每次成员类型出现时显示类型信息,但是它给我的信息我是之后。
It's not a great solution, because I don't really want to have to dispay the type information every time when the member type appears on its own, but it does give me the information I was after.
这篇关于如何让VS调试器显示对象成员的类型名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!