有没有办法在VS调试器中自定义自定义对象的工具提示? [英] Is there a way to customize the tool tip of a custom object in the VS Debugger?
本文介绍了有没有办法在VS调试器中自定义自定义对象的工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
是的,看看MSDN文章 使用调试器显示属性增强调试 ,其中提供:
-
DebuggerDisplayAttribute
- 计算一个字符串以显示 -
DebuggerBrowsableAttribute
- 指出哪些成员应显示 -
DebuggerTypeProxyAttribute
- 指示提供da的单独类型ta显示。
Say you have a custom class call it Foo. When you then have an instance of this class, during debugging, if you mouse over this object, you'll either see the fully qualified namespace name of the type, or if you override ToString in this class, you'll see that. Is there any way to customize what the tool tip will say?
解决方案
Yeah, check out the MSDN article Enhancing Debugging with the Debugger Display Attributes, which offers:
DebuggerDisplayAttribute
- Calculate a string to displayDebuggerBrowsableAttribute
- Indicate which members should be shownDebuggerTypeProxyAttribute
- Indicate a separate type that provides data to be shown.
这篇关于有没有办法在VS调试器中自定义自定义对象的工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文