Setting a Breakpoint Filter

Menu:  [Right-Click] -> Filter; Tools -> Options -> Debugging -> General
Versions:  2008,2010
Published:  5/6/2010
Code:  vstipDebug0024

 

Breakpoint Filters are very cool!  They are used when you want to take your Breakpoints to the next level and break based on thread, process, and/or machine.  Just make sure you can set them by going to Tools -> Options -> Debugging -> General and put a check in the "Enable breakpoint filters" checkbox:

image

 

To make a Breakpoint Filter just Right-Click any regular Breakpoint and choose "Filter":

image

 

You will get the Breakpoint Filter dialog:

image

 

As you can see, I've decided to break whenever the Breakpoint is hit AND the thread name is "bubba".  Here is what it looks like in the Threads window when I actually run my code and the Breakpoint is hit:

image

 

If you want to try this out for yourself, check out the threading demo script here:

https://cid-3dc455e4300aedb6.skydrive.live.com/browse.aspx/Public/Visual%20Studio%202010%20-%20NET%20Framework%204/What%5E4s%20New%20in%20Visual%20Studio%202010