Use “Run To Cursor” and save time while debugging

Run to cursor is a great and an hidden features of Visual Studio. This can really boost up your productivity of work while debugging any application in Visual Studio.  You can really avoid the step by step debugging and directly stop the debugger where you are targeting it to stop.  “Run to Cursor” is  just like another breakpoint, but in this case you don’t need to start the Visual Studio debugger manually and the break points clears when it’s hit. When you select the run to cursor option, visual studio starts the debugger automatically and execution stopped to the selected line.

Right click on the line where you want to stop the debugger, you will get the “Run to Cursor” option from the context menu; Select it.

run to cursor

You will find, the Visual Studio start the execution of your application and it will stop on the line you had selected.

run to cursor hit

From here, you can continue debugging in the way you want.  In a general term, as name suggests, the “Run to Cursor” keeps the debugger at the point you mentioned.

You can achieve this by using  “CTRL + F10” shortcut key.

This is features is mostly used when you are debugging a repetitive code path or a  module that is getting called multiple times.

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

One Comment to “Use “Run To Cursor” and save time while debugging”

Comments are closed.