16

In Visual Studio, F5 is used for both of StartDebugging and Continue, which is rather annoying. Because many other IDEs/Debuggers don't act in the same way, e.g. cgdb, IntelliJ IDEA.

For simplicity and universality, I want to use one key-binding scheme for all IDEs/Debuggers. I cannot change other IDEs/Debuggers to bind both of StartDebugging and Continue to F5.

So, my question is:

Is there a way to separately bind StartDebugging and Continue to different keys in Visual Studio?

xmllmx
  • 39,765
  • 26
  • 162
  • 323
  • I created a support ticket at visual studio. Please upvote it to make it happen: https://developercommunity.visualstudio.com/idea/665439/keyboard-shortcut-for-debugcontinue.html – Tigerware Feb 03 '20 at 08:38

2 Answers2

9

The command you're looking to change is called Debug.Start

This link describes how you can remap commands to different keys:

http://msdn.microsoft.com/en-us/library/5zwses53.aspx

Debug.Start is the same command for both Run and Continue, so you cannot map the action to different keys.

RJFalconer
  • 10,890
  • 5
  • 51
  • 66
ISeeSharp
  • 315
  • 1
  • 9
  • 6
    No it won't allow you to bind to different keys, that's exactly what he was asking, as I have the same problem, Run and Continue are bound to the same command. – Dado Nov 12 '15 at 09:27
  • 2
    Yeah this sucks, it doesn't match other comon debuggers (chrome, intellij, or even visual studio code), would be nice to have to get standardized keys. – moodboom Feb 26 '19 at 15:35
  • 1
    I created a support ticket to change it to run and continue at visual studio. Please upvote it to make it happen: https://developercommunity.visualstudio.com/idea/665439/keyboard-shortcut-for-debugcontinue.html – Tigerware Feb 10 '20 at 08:16
  • I've voted on that I suggest everyone else do the same! – zippy72 Jun 09 '20 at 14:16
  • You can map multiple keys to the same command. I have both F5 and F8 bound to `Debug.Start`. It's not identical behavior to other IDEs but practically the same in most cases. – silentorb May 14 '22 at 05:11
0

A workaround that I use is to have two shortcuts bound to Debug.Start. This way it allows me to naturally use the keybinds I'm used to when debugging -- for me that's pressing F9 to continue:

enter image description here

You'll notice there are now two shortcuts bound to Debug.Start: enter image description here

so you can still use F5 to start debugging and then your chosen key to Debug.Continue when you're debugging.

Luke Garrigan
  • 4,571
  • 1
  • 21
  • 29