我可以自定义在Visual Studio中进行调试时悬停时显示的智能感知值吗? [英] Can I customize the intellisense value shown when hovering while debugging in visual studio?
问题描述
当我将鼠标悬停在Visual Studio中的变量上时,它会弹出一个小控件,其中显示了变量名称,类型以及用于查看成员的+框等.但是对于某些类型,变量类型被更有用的信息取代了例如对于RectangleF"{X = 0.0 Y = 0.0宽度= 0.0高度= 0.0}".
When I hover over a variable in visual studio, it brings up a small control which shows the variable name, type, and a + box for viewing members, etc. But for some types the variable type is replaced by more helpful information such as "{X = 0.0 Y = 0.0 Width = 0.0 Height = 0.0}" for a RectangleF.
是否可以指定应显示的内容?有IDE设置吗?有功能属性吗?
Is there a way to specify what should be displayed? Is there an IDE setting? Is there a function attribute?
我正在使用Visual Studio 2008,语言是Visual Basic.
I am using visual studio 2008, language is visual basic.
推荐答案
您正在寻找DebuggerDisplay属性:
The DebuggerDisplay attribute would be what you are looking for:
[DebuggerDisplay("x={xvar} Y={yvar} Width = {widthvar} Height = {heightvar}")]
可以在此处
这篇关于我可以自定义在Visual Studio中进行调试时悬停时显示的智能感知值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!