From the course: Visual Studio: Advanced Debugging Tools

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Enhance debug sessions with DebuggerDisplay attribute

Enhance debug sessions with DebuggerDisplay attribute - Visual Studio Tutorial

From the course: Visual Studio: Advanced Debugging Tools

Start my 1-month free trial

Enhance debug sessions with DebuggerDisplay attribute

- [Instructor] Have you ever thought much about what Visual Studio shows you when you hover over items in the editor. For instance, when I'm in my code and writing code, and I hover over this variable, I get information helps me write better code, it tells me this is a local variable, and tells me it's a type robot factory that robot. This is useful because they use the var keyword here, maybe unclear or what the type is for this variable. When I look at a method, like this tells me more information about that method. This is great information when you're writing code, but it's less useful when you're debugging the code. What I'd like to see when I'm debugging is information about what's stored in this variable. And that's exactly what Visual Studio does. When I hover over this, it tells me there is an instance of a robot in here, and if I drill down I can see details. Or if I hover over this and see, I see I have an instance…

Contents