Hack 37. Troubleshoot Breakpoints
your breakpoints aren't working.In [Hack #36], we
discussed the various ways to set
and use breakpoints, but sometimes your breakpoints just
don't work. Andy Pennell, the development lead at
Microsoft responsible for the Visual Studio debugger, has created a
small web application that will help you troubleshoot problems with
your breakpoints. To use this tool, you simply answer the questions
and then follow any steps or recommendations that the tool makes.
Let's take a look at the tool in action.The breakpoint helper can be found
at http://www.controlav.com/bphelper and is
shown in Figure 5-10.
Figure 5-10. Visual Studio Debugger Breakpoint Helper

asks you what version of Visual Studio you are using and is shown in
Figure 5-11.
Figure 5-11. Which Product Do You Have?

this example, I am going to select Visual Studio 2003. The next
screen asks you what kind of breakpoint you are currently using and
is shown in Figure 5-12.
Figure 5-12. What Kind of Breakpoint?

type of breakpoint. The next screen asks what kind of code this
breakpoint is set on and is shown in Figure 5-13.
Figure 5-13. What kind of code is your breakpoint set in?

whether any breakpoints are working and is shown in Figure 5-14.
Figure 5-14. Do Any Managed Breakpoints Work At All In Any Project?

the breakpoints work in that project. Let's suppose
that they don't work in the new project either, so I
click No and then see the screen in Figure 5-15.
Figure 5-15. You Need to Reinstall the .NET Framework

the .NET framework to fix this issue. The breakpoint helper is a very
valuable tool and should be the first place you turn whenever you
have problems with your breakpoints not working correctly.