Searching Breakpoints
Versions: 2010
Published: 1/27/2010
Code: vstipDebug0002
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:
- Set some Breakpoints in your code
- Open the Breakpoint window (CTRL + ALT +B)
- [optional but recommended] Set some labels for your Breakpoints that have values you would like to search on
- 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:
Okay, so I type the letter "p" into the search box and press enter. Here is what I get:
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:
See the "In Column" drop-down? Well, don't just sit there! Click on it!
JACKPOT! Now you can choose which column you want to search on. So, if I choose "Labels" for example I get this:
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:
Comments
Anonymous
January 27, 2010
That's awesome. Can you save/export a breakpoint set, store it in a project or TFS, etc? I've seen some macros that get partway there, but never quite worked when push came to shove.Anonymous
January 27, 2010
Yes you can. Look for my upcoming post on importing and exporting breakpoints :)Anonymous
January 27, 2010
OMG I LOVE VS2010!!! That's about the most awesomest thing I've yet read about it. This means that the 3 hours I spent carefully setting up just the right tracepoints to debug the [Text input | Load/Save | Vector Math] system can be saved out with the code, and loaded right back up when the next bug appears in the same system! I will definitely be back to gush some more when you cover the topic.