Keyboard shortcut to switch between Debug and Release modes in Visual Studio

[亡魂溺海] 提交于 2019-12-20 16:20:12

问题


Is there a keyboard shortcut that allows you to easily change Build Configuration (say, from Debug to Release) in 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?


回答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.




回答2:


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

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

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.

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



来源:https://stackoverflow.com/questions/1033953/keyboard-shortcut-to-switch-between-debug-and-release-modes-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!