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
F12: Open File - Visual Studio Marketplace.
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#
F5 is used to start your project in debug mode and Ctrl-F5 is used to start your project without debug mode.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With