Run to Cursor

Keyboard:  CTRL + F10
Menu:  [Right-Click] -> Run To Cursor
Command:  Debug.RunToCursor
Versions:  2008,2010
Published:  5/5/2010
Code:  vstipDebug0023




This is one that a lot of people have told me to write about.  It’s been around a while but seems to get lost among all the other features that are out there.  Basically, if you have some code and want to quickly run it and set a temporary Breakpoint at the current line then this is for you. 


Just put the cursor on the line you want to break on:



And hit CTRL + F10.  It will start the application and set a temporary Breakpoint on the line you were at.  The next time the code hits that line, it will enter break mode:


Comments (3)

  1. Daniel Rose says:

    This feature is very useful when debugging larger code blocks (ex. in C code). Say I have a breakpoint at some code. After hitting it and stepping through the code I get to some code portions which I can skip. Instead of setting another breakpoint at the next interesting point in the function, I simply use Ctrl+F10 to skip to that point.

  2. Daniel Rose says:

    EDIT: With "skip to that point" I meant "execute to that point", of course.

  3. Deepa says:

    Thanks, i was not aware of this functionality being a newbee.

Skip to main content