问题
Is there any keyboard shortcut to add the highlighted variable to watch in VS IDE? It takes a bit of time to right click and choosing "Add to watch" option in the very long drop down menu and its annoying.
-Thanks, Suresh.
回答1:
Not by default.
You can add one: Tools | Options | Environment | Keyboard and enter "watch" in the "show commands..." box. You need the "Debug.AddWatch" command.
回答2:
Go to menu: Tools -> Options -> Environment -> Keyboard
search for "watch" and the Debug.Addwatch will be revealed. Add an assigned shortcut.
回答3:
You can just highlight & drag and drop the variable into the watch window.
来源:https://stackoverflow.com/questions/1113672/keyboard-shortcut-to-add-to-watch-in-vs-2008