有没有办法在VS调试器中自定义自定义对象的工具提示? [英] Is there a way to customize the tool tip of a custom object in the VS Debugger?

查看:107
本文介绍了有没有办法在VS调试器中自定义自定义对象的工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说你有一个自定义类叫它Foo。当您具有此类的实例时,在调试期间,如果您将鼠标悬停在此对象上,您将看到类型的完全限定命名空间名称,或者如果您在此类中覆盖了ToString,那么您将看到这一点。有没有办法自定义工具提示会说什么?

解决方案

是的,看看MSDN文章 使用调试器显示属性增强调试 ,其中提供:




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:

这篇关于有没有办法在VS调试器中自定义自定义对象的工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆