Here are some extremely helpful keyboard shortcut keys for Visual Studio 2012. You probably know most, but some you won’t know. For instance, did you know that Ctrl+. is the same as Sift+Alt+F10?

These shortcuts assume you have you environment configured for C# development.  If you have another configuration, like web, these shortcuts may not work.

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.

Go to Definition (F12) Navigate to the definition of the method or variable. Super useful.

Find all References (Shift + F12)

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

List Members (Ctrl +J or Ctrl +K, L) Displays the autocomplete list for classes, methods, or properties.

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.

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.

Quick Watch (Ctrl +Alt +Q) Highlight some code and hit these shortcut keys to display the Quick Watch dialog.

Comment / Uncomment (Ctrl +K, C / Ctrl +K, U) Comments or uncomments a block of code. Works with C#, VB, ASPX.

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)

Surround With (Ctrl +S) Surrounds a block of code with a code snippet.

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)

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

  • http://www.anma.se/ Marcus Andersson

    Hi!
    I was just wondering whether (Ctrl +K, C / Ctrl +K, U) really works with CSS.

  • http://www.blogger.com/profile/05064129530204593277 Rob Volk

    Ahh you caught me.. Comment/uncomment doesn’t work for CSS files unfortunately. I wonder if MS will add support in 2010.

  • http://www.blogger.com/profile/14921478512002666912 Venkat

    Hi Rob!!

    Here are few more

    Delete All Break Points (Ctrl +Shift +F9)
    Code Snippet Manager (Ctrl +K,B)
    Attach to Process (Ctrl + Alt + P)

  • Anonymous

    Great post.

  • Anonymous

    thanks

  • Anonymous

    Very Helpful, great job!

  • http://www.blogger.com/profile/10047873862909988399 Man

    Surround With is (Ctrl + K,S)

  • http://www.blogger.com/profile/04815054493370773138 yasmine lubino

    I really enjoy reading your blog as the postings are so simple to read and follow. Outstanding. Please keep it up. Thanks.
    Diet Solution Program Review
    Diet Solution Program

  • http://www.stellarinfo.com/ data recovery

    I am software developer and these shortcuts will really minimize the time I use to code. these shorcuts would be really of use to me thanks

  • http://www.blogger.com/profile/05301623728558083247 RaviShankarKota

    awesome post..thanks to author..

  • http://www.blogger.com/profile/16013469425855430795 හරී

    එල එල…නියමයි…බොහොම ස්තුතියි…

  • http://www.blogger.com/profile/12791636183426078879 A. Mohamed Ileeyas

    nice tips….. keep it up

  • http://www.blogger.com/profile/14703628973153442186 arun@darkside

    nice tips…..but not flexible for VC++ settings……

  • http://www.blogger.com/profile/10383221440801728834 Sam

    Thanks, very useful… :)

  • http://medicalbillingmaine.com/2011/services-offered-by-medical-billing-online-facilities/ Medical Billing Maine

    How about print and print options?

    Marc

  • http://www.blogger.com/profile/16667427858265999454 kaviprashu

    hi ROB VOLK,

    Thanks very helpful post..

    Thanks and regards,
    kaviprashu

  • http://www.blogger.com/profile/17533881555063691987 Bhanu

    Hi This is good one….

  • Atif Saddiqu

    This is really helpful

  • Matt Campbell

    Hi!

    I found the keyboard combination Ctr+K, K didn’t set a bookmark. The combination that worked for me was Ctr+K, Ctr+K. Has anyone else found this to be the case?

    Matt