Visual Studio Debugger Tips and Tricks: Set Next Statement

Mariusz Wojcik

Set next statement

In the last Visual Studio Debugger Tips’n’Tricks I showed Run To Cursor option which allows for running debugger and breaking in selected line. Today I am going to present another option called Set Next Statement.

Set Next Statement (shortcut: Ctrl + Shift + F10) is very useful feature and allows to move execution pointer to selected statement. This can be used to not execute statement(s), like skipping line 27 in above example. It can also be used to run statement(s) again, by simply selecting Set Next Statement on the line already executed. When combined with editing variable values, this is a very powerful tool.

If you a mouse person, you can easily Set Next Statement by moving yellow arrow (Set Next Statement arrow) on the left.

Find other Visual Studio Debugger Tips’n’Tricks: http://www.mariuszwojcik.com/tag/Debugging