Visual Studio 2013: Working in the Breakpoints Window

  NOTE: This is an older feature. I’ve updated the information for VS2013.   The Breakpoints Window (CTRL+ALT+B) is an awesome tool. We use it frequently to aid us in our debugging efforts. Let’s take a look at some of the things you can do when working in this window.       Deleting Breakpoints…

1

Visual Studio 2013: Working with Breakpoint Labels

  NOTE: This is an older feature. I’ve updated the information for VS2013.   The Breakpoints Window has supported adding labels since VS2010, however most people aren’t aware of this feature. But how does this help you?  Well, first, you can put friendly names for Breakpoints to make them easier to understand.  Second, you can…

6

Setting a Breakpoint on a Class

General: CTRL + B Visual Basic 6: CTRL + B Visual C# 2005: CTRL + B; CTRL + D, N; CTRL + D, CTRL + N Visual C++ 2: [no shortcut] Visual C++ 6: CTRL + B Visual Studio 6: [no shortcut] Windows: ALT + D, B, F Menu: Debug | New Breakpoint | Break…

0

Delete All Breakpoints

Keyboard:  CTRL + SHIFT + F9Menu:  Debug -> Delete All BreakpointsCommand:  Debug.DeleteAllBreakpointsVersions:  2008,2010Published:  5/7/2010Code:  vstipDebug0025   You can exercise the nuclear option on your Breakpoints and delete them all.  You have a couple of options:   WARNING: You had better have an export of your Breakpoints before you do either of these options if you…

4

Set a Complex Breakpoint Condition

Menu:  [Right-Click the Breakpoint] -> ConditionVersions:  2008,2010Published:  5/4/2010Code:  vstipDebug0022     So, it turns out that the REAL power of the Breakpoint Condition dialog is the ability to execute any line of code from it.  You could do something really evil like reset a variable so you have an infinite loop:     Or you…

8

Set a Simple Breakpoint Condition

Menu:  [Right-Click the Breakpoint] -> ConditionVersions:  2008,2010Published:  5/3/2010Code:  vstipDebug0021        Did you know you can set Conditional Breakpoints?  They are arguably the most powerful among the types of Breakpoints you can set.  There are many layers to using them correctly and knowing is half the battle.   Let’s start with the Breakpoint Condition…

5

Set a Breakpoint on a Function

Keyboard:  CTRL + BMenu:  Debug -> New Breakpoint -> Break at FunctionCommand:  Debug.BreakatFunctionVersions:  2008,2010Published:  4/30/2010Code:  vstipDebug0020 “Normal” breakpoints are based on line and character position: But what if you don’t want to break on a specific line but instead break when you hit a particular function?  No problem!  There are three ways to do this:…

2

Enable or Disable All Breakpoints

Menu:  Debug -> Disable All Breakpoints; Debug -> Enable All BreakpointsCommand:  Debug.DisableAllBreakpoints; Debug.EnableAllBreakpointsVersions:  2008,2010Published:  4/27/2010Code:  vstipDebug0018   Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!   Okay, so you have a scenario where you have a lot of Breakpoints:   And you want to…

6

The Best of Visual Studio 2010: How to Import and Export Breakpoints

Command:  EditorContextMenus.CodeWindow.Breakpoint.BreakpointExport; DebuggerContextMenus.BreakpointsWindow.Exportselected;Versions:  2010Published:  1/28/2010Code:  vstipDebug0003   Ever just wanted to email someone your Breakpoints?  Maybe do a mass change to all your breakpoints at once with a text editor?  Or just save them in case you mess them up doing something else?  Well you can do it all with the Import / Export Breakpoint…

2

The Best of Visual Studio 2010: Searching Breakpoints

Versions:  2010Published:  1/27/2010Code:  vstipDebug0002     Yes, Virginia, there is a Santa Claus and he brought you the ability to search Breakpoints!!! 🙂  In its current incarnation it is a blunt instrument but still a very powerful one.  So how do you use it?  Simple just follow these steps: 1. Set some Breakpoints in your…

2