Shortcut key to next breakpoint in Visual Studio - visual-studio

I'm using Visual Studio and would like to use the keyboard to go to the previous/next breakpoint. I had a look at Options|Environment|Keyboard but found no such command.
Is there a way to do it?

For people wanting to see each breakpoint, that ended up here. (Like me)
Try Debug -> Windows -> Breakpoints.

You can jump to breakpoints during debugging of application. Here is a list of shortcut keys that might help you.
Create or remove breakpoint on the current line: F9
Execute code one statement at a time, following execution into function calls (Step Into): F11
Execute the next line of code but not follow execution through any function calls (Step Over): F10
Execute the remaining lines of a function in which the current execution point lies (Step Out): SHIFT + F11
Restart a debugging session : CTRL + SHIFT + F5
Resume execution of your code from the current statement to the selected statement (Run to Cursor): CTRL + F10
Run the application (or jump to next breakpoint): F5

Use 'Run To Cursor' (CTRL+F10). The debugger will execute your application up to where your cursor is and break. For more details visit: How to skip over code in the Visual Studio Debugger

If you want to just want to navigate and not use debugger, I use an extension called Bookmarks by Alessandro Fragnani. It's super useful when you have to navigate forward and backwards through long lines of code on a page and even faster if you setup shortcut keys.

Here is how to Configure
I've configured mine shortcut key Manually

Related

How to disable F10/F11 unless I'm debugging in Visual Studio?

So I have this weird problem where I press keys subconsciously sometimes. F10 (step over) and F11 (step into) are two that I keep pressing... or if I meant to hit F12, sometimes I hit F11 accidently...
Anyway, this is a major annoyance since it starts a build, which takes a while, I immediately start spamming CTRL + BREAK to break the build, but it only rarely works; it seems that it just freezes or maybe there is only a short window of time where it does work? Then if the build succeeds, my configuration is set up to do a deploy as well, and often, VS just locks and I have to end the process with Task Manager and restart VS.
So just wondering if there is any possibility to only allow F10, F11 to work when pressed if I am debugging, where I actually need it (I use attach to process so F5/F10/F11 are useless shortcuts when not debugging)?
Thanks.
You can assign F10 to the following C# command for Visual Commander:
if (DTE.Mode == vsIDEMode.vsIDEModeDebug)
DTE.ExecuteCommand("Debug.StepOver");
It will call StepOver only when you are in the Debug mode. For F11 use Debug.StepInto.
I had the same problem - kept randomly hitting F11 instead of F12. I ended up re-assigning F10 and F11 to something innocuous (like Find Next / Previous) and then re-assigned StepOver / StepInto to Ctrl-' and ctrl-; respectively (these are the same shortcut keys used by the Chrome debugger).
Perhaps a bit extreme, but it works for me. I now have a new problem though where I occasionally invoke Find Next when debugging :) On balance the new problem is less annoying.

Return to normal execution after debugging a part of code

When I debug a program using IntelliJ' debugger, how can I return to the normal execution of the program after debugging a part of the code ?
I start a program, test it.
When the debugger find breakpoints, it starts the step by step debugging of the program.
I do my stuff and my checks, nothing goes wrong.
I want to exit step by step debugging and go back to a fluid execution of the program (without having to press a button for all actions) until the debugger find a new breakpoint.
How can I do that and exit the step by step debugging?
You can use the "Resume Program" button, which looks like a green triangle (a "play" button"), or the F9 shortcut.
See, e.g., this screenshot from a debugging session I started (mouse cursor and the hovering tooltip show the button's location):
Note: The screenshot was taken in IntelliJ IDEA 14.1.4 so the exact layout may differ according to your specific version, but the same behavior, buttons and shortcuts have existed in IntelliJ for years now.

How to disable F12 to debug application in Visual Studio 2012

If I hit F12 while my application runs under Visual Studio in debug mode, the WM_KEYDOWN never reaches my event loop, but it immediately triggers a breakpoint. Is it possible to disable this feature, or reassign it to another, less conflicting hotkey (e.g. CTRL+F12)? I figure the must be a registry key, but I can't find it...
Any help is greatly appreciated!
F12 is a reserved key for the debugger and its kernel-based https://msdn.microsoft.com/en-us/library/windows/desktop/ms646309.aspx
But you can change the registry entry
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug] UserDebuggerHotKey=dword:00000000
to something else like 0x13 (Pause)
got this from http://conemu.github.io/en/GlobalHotKeys.html
You can disable it from Tools->options->Keyboard
It's easy to reassign a value like that to whatever you want.
1) Go to Tools/Options and click on Keyboard (under environment). Then find the command associated with F12. Which one depends on which mapping scheme you use, so I can't tell you the one to find.)
Then change it to whatever you want.
Too bad I can't add comments...
When I type in F12 (for Press shortcut keys), I get Edit.GoToDefinition. If I remove that assignment and then try again, it shows how it is used with Page Inspector.
If you enter F12 and nothing shows, then you can assume that VS is not using F12 and something else is.
You can just try assigning F12 to something and see if that is called instead - then at least you will have some idea of if VS is controlling it or something external to VS is.
Remember that you could also have some application that has remapped F12 so that when you press it, your application is getting a signal that some other key or key combination has been pressed (happened to me once.)

Avoid starting debugging from the beginning

Is it possible to set a starting point for the debugger so that every debugging session
will start immediately from that point (instead of starting from the beginning of the code)?
Or to express it differently:
Isn't it possible to somehow store everything until the breakpoint so that next time the debugger could just instantly resume to that specific breakpoint (instead of starting from the beginning of the code and pausing at the breakpoint)?. Is there any debugger that can do this?
I am using Microsoft Visual Studio Express 2012.
Thank you.
Use a Debugger in visual studio.
In your code, click on the line number, you will see a dot on the line.
When you run the program, it will 'pause' at the line you specify, you can then walk through your program line by line from there
You can use a breakpoint at a line that you want to inspect.
You have a description how to do it here.
You could attach a debugger to a running process, but i'm afraid that it will be on a random place of execution. You could make a wait for a key or button press in your code and attach to your program before continuing.
No. It would have to run the code up to the point you want to get all the variables etc in the right state. If you just set a breakpoint where you're interested from and hit F5 it should get there quickly enough.
If it doesn't get there quickly enough, jot down the variables used and make some unit tests round the troublesome functions instead. That will skip the 10 minutes.

Visual Studio Debugger Issue

When I'm debugging in Visual Studio, I set a breakpoint where I want to start and press F5. When I continue pressing F11 to do a step by step process of how the program runs, when I get to a standard library function e.g std::cout the runs through all the steps in .
Is there anyway I can stop this and allow it to just be more localized? I've had a play with the settings but not stumbled across a way to do it.
I'm completely new to programming so I apologize if this is a simple fix.
Many Thanks
There are two other stepping commands that will likely be helpful to you:
Step Over (F10) - Steps over a function without going into it.
Step Out (Shift + F11) - Steps out of the current function.

Resources