How to rebind a key to "Continue" command other than F5 in Visual Studio?
Asked Answered
P

2

19

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?

Paperweight answered 5/1, 2015 at 1:55 Comment(1)
I created a support ticket at visual studio. Please upvote it to make it happen: developercommunity.visualstudio.com/idea/665439/…Liggitt
U
13

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.

Unbosom answered 5/1, 2015 at 2:10 Comment(5)
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.Xiphisternum
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.Menchaca
I created a support ticket to change it to run and continue at visual studio. Please upvote it to make it happen: developercommunity.visualstudio.com/idea/665439/…Liggitt
I've voted on that I suggest everyone else do the same!Ehrlich
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.Extracanonical
M
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.

Melanymelaphyre answered 31/8, 2022 at 14:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.