Visual Studio 2013 Breakpoint Labels – The ability to add labels to breakpoints has been around since Visual Studio 2010, but I was until recently unaware of this feature. How could this be possible? Well I maintain that as a general rule, many developers learn just enough to get them by. After that they accidentally discover new features.
This is quite believable because the Visual Studio IDE is very feature rich. So how do Visual Studio 2013 Breakpoint Labels help us? Well, for the following reasons.
Visual Studio 2013 Breakpoint Labels – How Do They Help
Well, for one, they provide a friendly name for the breakpoint allowing you to sort and search them with ease. This is especially useful if you have several breakpoints in your code. Creating a new label for a breakpoint is easy.
Right click on the breakpoint and select the ‘Edit labels’ option from the context menu. You know, it is at this point that I am really surprised that I have never paid enough attention to notice this option available to me.
You can now give this breakpoint any name you want. Seeing as I chose to break on the code that checked the existence of a file, the name was obvious.
Then open up the Breakpoints Window (CTRL+ALT+B) and you will see your labelled breakpoint displayed. It becomes obvious how useful this feature is when you have many breakpoints. Lastly, you can search the breakpoints by changing the ‘In Column’ value to ‘Labels’ and typing in the label name in the seach field.
I hope that some of you can find this short tip valuable. I will try to post a few more articles on Visual Studio 2013 and try to dig a little deeper than what I have been used to and comfortable with. I hope that you will join me.