Subscribe Now!

Enter your email address:

Friday, April 29, 2011

Visual Studio 2008 Keyboard Shortcuts


Here are some extremely helpful keyboard shortcut keys for Visual Studio 2008. You probably know most, but some you won't know. For instance, did you know that Ctrl+. is the same as Sift+Alt+F10?
Note: Some of the shortcuts won't work in all environment configurations (web, C#, etc).
To use, hold down the control key and hit the key combination. Works on the whole document, a specific line, or a selection of code.


  1. Go to Definition (F12) Navigate to the definition of the method or variable. Super useful.
  2. Find all References (Shift + F12)
  3. Update References/ Add Using Statement (Ctrl +. or Shift +Alt +F10) I'm referring to the underline that appears under a variable to perform an action like add a using statement, or refacter a method or class name. Not sure what it's called but I use it all the time. Ex: ClassName
  4. List Members (Ctrl +J or Ctrl +K, L) Displays the autocomplete list for classes, methods, or properties.
  5. List Parameter Info (Ctrl +Shift +Space or Ctrl +K +P) Lists the parameters for a method. Use this shortcut when your cursor is inside the parenthesis of a method.
  6. Auto Format (Ctrl +K, D or Ctrl +E, D) Formats C#, VB, ASPX, Javascript, CSS, XML, XSL, and HTML code according to generally accepted formatting standards for the respective programming language. Makes code look nice and neat.
  7. Quick Watch (Ctrl +Alt +Q) Highlight some code and hit these shortcut keys to display the Quick Watch dialog.
  8. Comment / Uncomment (Ctrl +K, C / Ctrl +K, U) Comments or uncomments a block of code. Works with C#, VB, ASPX.
  9. Code Bookmarks Use these to bookmark a line of code. You can cycle through the bookmarks across any file within a project. Bookmarks come in very handy, try it out. Set/Unset Bookmark (Ctrl +K, K) Next Bookmark (Ctrl +K, N)
  10. Surround With (Ctrl +S) Surrounds a block of code with a code snippet.
  11. Build & Debug Shortcuts Set/Unset Breakpoint (F9) Build (F6 or Ctrl +Shift +B) Start Debugging (F5) Start Without Debugging (Ctrl +F5) Stop Debugging (Shift +F5) Continue (F5) Step Over (F10) Step Into (F11) Step Out (Shift +F11) Attach to Process (Ctrl + Alt + P)
  12. Delete All Break Points (Ctrl +Shift +F9)
  13. Code Snippet Manager (Ctrl +K,B)
  14. Attach to Process (Ctrl + Alt + P)




That's it for now, feel free to add more in the comments below. I'll try to update this post periodically.

Visual Studio 2008 Keyboard Shortcuts


0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...