Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2010 debugger find goto current line stopped at shortcut key

Tags:

1) I put a breakpoint, VS breaks where I put the breakpoint.

2) I then start browsing around the code normally to put another breakpoint somewhere down the execution path. (maybe in another class in some other cs file)

3) I would now like to return to where I first stopped (just navigation in the code. Do not confuse with the go back in debugger feature used in VS's intellitrace debugging tool)

Right now I place a bookmark and return to my bookmark. But I forget most of times to place a bookmark. Hence this question. There's got to be a shortcut to get back to current line of execution or stopped at or whatever phrase is used to describe this. I also have Resharper if I can craft up some hotkey or shortcut. Anyway I can get back to where the debugger has "broken". I sometimes also use Ctrl - multiple times to navigate backwards. thank you

like image 422
Gullu Avatar asked May 27 '11 15:05

Gullu


People also ask

What is F12 in Visual Studio?

F12: Open File - Visual Studio Marketplace.

What is F11 in Visual Studio?

Step into codeTo stop on each statement when you're debugging, use Debug > Step Into, or select F11. The debugger steps through code statements, not physical lines. For example, an if clause can be written on one line: C#

What is Ctrl F5 in Visual Studio?

F5 is used to start your project in debug mode and Ctrl-F5 is used to start your project without debug mode.


1 Answers

That would be the Visual Studio command "Debug.ShowNextStatement" (usually assigned to Alt+Num*). You can also use the Breakpoints Window (Alt+Ctrl+B) to navigate between your breakpoints.

UPDATE: I implemented @Alex 's request for a more discoverable and accessible MenuItem for this functionality, as part of a commercial Visual Studio extension I created called OzCode. It works similarly to Resharper's Context Actions: when you are in break mode but have navigated far away from the 'current statement', this QuickAction will appear:

ShowNextStatement

like image 129
Omer Raviv Avatar answered Apr 05 '23 10:04

Omer Raviv