Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know… You can set a breakpoint on a function from the Find Combo Box? - #235

Today’s tip was a part of tip #8 from my TechEd 2008 IDE Tips and Tricks talk on using Visual Studio Commands from the command window and the find combo box.

In the standard command bar, you’ll see the Find Combo Box right next to Find in Files.  You can obviously type in a function name and hit enter to search, but where’s the fun in that?

Foo method in find combo box

Type in the name of the method, as i have above, and hit F9.  You’ll notice the breakpoint is set at function foo.

Breakpoint set at method foo

Why did this happen?

F9 is bound to a command called Debug.ToggleBreakpoint.  If there’s text in the find combo box and you run a VS command from within the find combo box, VS will use that text as the command parameter.  In the case of F9, VS toggled a breakpoint at the specified function, hence setting a breakpoint at foo().

Technorati Tags: ,
Posted: Wednesday, June 11, 2008 3:00 AM by saraford

Comments

Fegelein said:

Doesn't work for me with VS2005 ... hitting enter directly navigates to the method I've described, however F9 gives no result.

What gives?

# June 11, 2008 7:18 AM

Visual Studio Hacks said:

My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Sara Ford's Tip of the Day #233 covers increasing Visual Studio environment fonts for presentations . US ISV Developer Evangelism

# June 11, 2008 10:47 AM

Programmerman said:

So it's just like the Ctrl+G for Go To Line, then?  Neat.

# June 11, 2008 11:11 AM

Sting said:

Great Tip!

@Fegelein: works for me in VS2005

# June 13, 2008 7:34 AM
New Comments to this post are disabled
Page view tracker