用于在Visual Studio中的调试和释放模式之间切换的键盘快捷方式

时间:2023-01-14 21:25:51

Is there a keyboard shortcut that allows you to easily change Build Configuration (say, from Debug to Release) in Visual Studio (2008)?

是否有键盘快捷键允许您在Visual Studio(2008)中轻松更改构建配置(例如,从调试到发布)?

In the Standard Toolbar there is a drop-down where one can easily change between Build Configurations, but I only know how to access it with my mouse.

在标准工具栏中有一个下拉列表,可以在构建配置之间轻松更改,但我只知道如何使用鼠标访问它。

Is there an easy way this can be done via the keyboard?

有没有一种简单的方法可以通过键盘完成?

3 个解决方案

#1


You can set up a key combo through the Tools -> Options -> Environment -> Keyboard dialog. The Build.SolutionConfigurations command will put your focus on the build configuration drop down so you can easily change the configuration with the arrow keys. Additionally the Build.SolutionPlatforms selects the Platform drop down. The only drawback is that focus will be taken away from whatever was previously selected.

您可以通过工具 - >选项 - >环境 - >键盘对话框设置键组合。 Build.SolutionConfigurations命令将把重点放在构建配置下拉列表上,以便您可以使用箭头键轻松更改配置。此外,Build.SolutionPlatforms选择Platform下拉列表。唯一的缺点是焦点将从之前选择的内容中删除。

#2


Just for the record, it's actually not that hard to use the standard keyboard mappings for the Configuration Manager dialog:

仅仅为了记录,使用Configuration Manager对话框的标准键盘映射实际上并不难:

Alt+B, O, (Arrow keys or first letter, e.g. D(ebug) or R(elease)), Enter

Alt + B,O,(箭头键或第一个字母,例如D(ebug)或R(elease)),回车

The dialog box pops up fairly quickly, so this works for me.

对话框弹出相当快,所以这对我有用。

#3


It doesn't seem there are, but you can set a key command (Tools -> Options -> Environment -> Keyboard) for Build.ConfigurationManager, which will open a dialogue box that you can use the cursor keys to navigate quickly.

它似乎没有,但您可以为Build.ConfigurationManager设置一个键命令(工具 - >选项 - >环境 - >键盘),这将打开一个对话框,您可以使用光标键快速导航。

You could also set up a macro (similar to this) and bind that to a hot key.

您还可以设置一个宏(类似于此)并将其绑定到热键。

#1


You can set up a key combo through the Tools -> Options -> Environment -> Keyboard dialog. The Build.SolutionConfigurations command will put your focus on the build configuration drop down so you can easily change the configuration with the arrow keys. Additionally the Build.SolutionPlatforms selects the Platform drop down. The only drawback is that focus will be taken away from whatever was previously selected.

您可以通过工具 - >选项 - >环境 - >键盘对话框设置键组合。 Build.SolutionConfigurations命令将把重点放在构建配置下拉列表上,以便您可以使用箭头键轻松更改配置。此外,Build.SolutionPlatforms选择Platform下拉列表。唯一的缺点是焦点将从之前选择的内容中删除。

#2


Just for the record, it's actually not that hard to use the standard keyboard mappings for the Configuration Manager dialog:

仅仅为了记录,使用Configuration Manager对话框的标准键盘映射实际上并不难:

Alt+B, O, (Arrow keys or first letter, e.g. D(ebug) or R(elease)), Enter

Alt + B,O,(箭头键或第一个字母,例如D(ebug)或R(elease)),回车

The dialog box pops up fairly quickly, so this works for me.

对话框弹出相当快,所以这对我有用。

#3


It doesn't seem there are, but you can set a key command (Tools -> Options -> Environment -> Keyboard) for Build.ConfigurationManager, which will open a dialogue box that you can use the cursor keys to navigate quickly.

它似乎没有,但您可以为Build.ConfigurationManager设置一个键命令(工具 - >选项 - >环境 - >键盘),这将打开一个对话框,您可以使用光标键快速导航。

You could also set up a macro (similar to this) and bind that to a hot key.

您还可以设置一个宏(类似于此)并将其绑定到热键。