Run to Cursor

Tips Search

Run to Cursor

  • Comments 3

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

 

image

 

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:

image

 

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:

image

  • 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.

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

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

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