The Best of Visual Studio 2010: Adding labels to Breakpoints

Keyboard:  ALT + F9, L
Command:  EditorContextMenus.CodeWindow.Breakpoint.BreakpointEditlabels
Versions:  2010
Published:  1/26/2010
Code:  vstipDebug0001

Did you know that Breakpoints now support labels?  They do!  Here is how you use them:

1. Set one or more Breakpoints in your code

 

2. Open the Breakpoint window (CTRL + ALT + B)

image

3. Notice the new "Labels" column?  Just Right-Click on your Breakpoint and choose "Edit Labels" (ALT + F9, L)

image

4. You get this cool new dialog:

image

5. You can type in one (or more) labels for the Breakpoint, then click OK.  You should see your labels on your Breakpoint:

image

Okay so how does this help you?  Well, first, you can now put friendly names for Breakpoints to make them easier to understand.  Second, you can sort by the label names.  And, third, you can SEARCH the labels when you have a lot of Breakpoints.