Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I customize the intellisense value shown when hovering while debugging in visual studio?

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.

Is there a way to specify what should be displayed? Is there an IDE setting? Is there a function attribute?

I am using visual studio 2008, language is visual basic.

like image 973
Craig Gidney Avatar asked Jan 22 '09 23:01

Craig Gidney


1 Answers

The DebuggerDisplay attribute would be what you are looking for:

[DebuggerDisplay("x={xvar} Y={yvar} Width = {widthvar} Height = {heightvar}")]

More info can be found here

like image 72
Nathan W Avatar answered Oct 18 '22 09:10

Nathan W