The Best of Visual Studio 2010: Searching Breakpoints

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

The Best of Visual Studio 2010: Searching Breakpoints

  • Comments 2

Versions:  2010
Published:  1/27/2010
Code:  vstipDebug0002

 

clip_image002

 

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 code

 

2. Open the Breakpoint window (CTRL + ALT +B)

 

3. [optional but recommended] Set some labels for your Breakpoints that have values you would like to search on

 

4. Type the string you are looking for in the search box inside the Breakpoint window

 

 

Issues

So, like I said before, this is kind of a blunt instrument.  It assumes you are doing a wildcard search of *[your search text]* instead of letting you use wildcards or regular expressions so watch out.  Also, it searches on ALL VISIBLE COLUMNS.  This will really mess you up.  Let me illustrate:

Say I want to search on the letter "p" given this setup:

clip_image004

 

Okay, so I type the letter "p" into the search box and press enter.  Here is what I get:

clip_image006

 

Why?  Well look at the "Name" column.  Do you see "Program.cs"?  Has a "p" in it doesn't it?  There you go.  This is easily fixed if we look just a little further to the right of the "Search" combo box:

clip_image008

 

See the "In Column" drop-down?  Well, don't just sit there!  Click on it!

clip_image010

 

JACKPOT!  Now you can choose which column you want to search on.  So, if I choose "Labels" for example I get this:

clip_image012

 

And if I want to start all over again I just press the "X" button to the right of the "In Column" drop-down box:

clip_image014

  • That is so cool!!! now I can go home and sleep without having to dream with my breakpoints position haha

  • There are times where that would be really handy.  Perhaps when they decide to sharpen that instrument they could make the search apply to the code line the breakpoint is on, how cool would that be?

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