From the course: Ten Tips for the C# Developer
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Show custom debugger information - C# Tutorial
From the course: Ten Tips for the C# Developer
Show custom debugger information
- [Instructor] Visual Studio contains many powerful debugging tools, including these visualizer tools that allow us to visualize and see the values of variables and properties and other parts of our code while we're debugging and setting out a breakpoint. So for this example, I'm in this ShowExample method. And I've got a breakpoint on line 23. When I hit my breakpoint, I can see the contents of these variables here in many places. I've got an Autos window, I've got a Locals window. I can add items to a Watch window. All allow me to see the, in this case, the Locals, I can see the names of the local variables. And then I can read some basic information about it, for instance, allColors has a count of 140 and the data type for allColors is a GenericList of T and T in this case is CourseLib.WebColor. This is the class that I created in this part of this library. We'll look at the contents of this WebColor class…
Contents
-
-
-
Avoid race condition with TryGetValue method1m 46s
-
(Locked)
Better switch statements with pattern matching6m 42s
-
(Locked)
Readable literals with the underscore4m 8s
-
(Locked)
Extract items from sequence with indices9m 8s
-
(Locked)
Discard feature5m 3s
-
(Locked)
Be more functional with the conditional operator2m 42s
-
(Locked)
Create a thread-safe immutable type5m 13s
-
(Locked)
Use the ImmutableList collection4m 14s
-
(Locked)
Show custom debugger information4m 49s
-
(Locked)
Work with nested collections and SelectMany2m 45s
-
-