Setting a Breakpoint Filter

Tips Search

Setting a Breakpoint Filter

  • Comments 4

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:

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

  • 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.

  • Seriously great feature..!

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

    thanks for sharing.

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

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

    Z

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post