Wednesday, July 27, 2022
HomeCodingVisual Studio Productivity

Visual Studio Productivity

VS productivity Keybinds

These are the most useful shortcuts for Visual Studio:

Project navigation

  • Ctrl+T- easy navigation
  • Ctrl+,- open file
  • Shift+f12- find all references
  • Ctrl+f12; Ctrl+click- goto implementation
  • Ctrl + – – go back. _ works too
  • Ctrl+shift+ +- forward
  • Alt + f12- peek definition
  • Ctrl + K, K- place bookmark
  • Ctrl + K, W- show bookmarks

Working with files opened

  • Ctrl+tab- go forward in windows
  • Ctrl+shift+tab- go backward in windows
  • Ctrl+f6 – go to next tab
  • Ctrl+shift+f6- go to previous tab
  • Ctrl+f4- close tab
  • Alt+W+L- close all tabs

Cleanup

  • Ctrl + . – suggestions. Varies per context.
  • Shift + alt + . – select text which you can edit simultaniously
  • Ctrl + K, D- format code

Debugging

  • Shift+f11- go through the method
  • F11- go into
  • F10- go through

Visibility

  • Shift+alt+enter- full screen
  • Ctrl+M,M- collapse/expand method/class
  • Ctrl+N,N- new file

Code snippets

  • (Just type the following and hit tab)
  • Ctor- constructor
  • Prop- property set;get;
  • Propfull- full property
  • Cw- console write
  • For- for loop
  • Foreach- auto foreach
  • Equals- equals implementation

Auto clean up

  • Via Productivity tools extension:
  • One save-
  • Tick clean up usings
  • Tick format code

Debugging

  • Call stack- a window showing where the calls to functions were made
  • Locals
  • Add to watch
  • Pause execution vs continuing live
  • Don’t forget to have a DEBUG constant set in project build settings, so that you can successfully attach a debugger to your code.
  • You can debug.exe outside VS. All you have to do is to attach a process to the debugger.
  • You can move back and forth in code by dragging an execution arrow and moving it to wherever you want.
  • Code editing while the program is in debug mode is possible. All you have to do is to click the pause button, so that your program is not executing anything. Then you can type the code, and it will be executed if you go to it.
RELATED ARTICLES
- Advertisment -

Most Popular

Recent Comments