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:



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



You will get the Breakpoint Filter dialog:



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:



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

Comments (4)

  1. Zain

    Excellent Job carrying on Sara’s tradition – have loved the tips on Breakpoints  – just like with Bookmarks (CTRL-K-K & CTRL-K-N have become my friends), there is much that can be very useful with Breakpoints if a person is just aware of them which is why I like your Feed– keep up the good work.

  2. Gaumz says:

    Seriously great feature..!

    Wasn’t aware with this feature, sometimes useless breakpoints disturbs a lot :-p

    thanks for sharing.

  3. adeel says:

    Great article. I think this similar feature was in VS 2008. Isn’ t it or am i wrong?

  4. zainnab says:

    adeel –  yep I think this one may go back even further to 2005 but defintiely in 2008.


Skip to main content