Using Run to Cursor II - Keyboard shortcut

A few months ago, I posted on using Visual Studio's Run to Cursor feature to set a temporary breakpoint, compile, deploy and start your application. Recently, one of my readers emailed me and mentioned that I had forgotten to talk about the handy keyboard shortcut for Run to Cursor.

As with the previous example, I will use Visual Studio .NET 2003 and the .NET Compact Framework WebCrawler sample.

  • Scroll to the first line in the startButton_Click method (MainForm.cs)
  • With the insertion cursor (blinking vertical line) on the target line, press Ctrl+F10

Note that there is no breakpoint icon in the Indicator Margin (left side of the code window)

  • When the WebCrawler starts, click the Start button.

Visual Studio stops in the startButton_Click method

  • Debug as desired

Enjoy!
-- DK

Disclaimer(s):
This posting is provided "AS IS" with no warranties, and confers no rights.