Over a million developers have joined DZone.

Top 13 Visual Studio Keyboard Shortcuts

DZone's Guide to

Top 13 Visual Studio Keyboard Shortcuts

· DevOps Zone
Free Resource

The Nexus Suite is uniquely architected for a DevOps native world and creates value early in the development pipeline, provides precise contextual controls at every phase, and accelerates DevOps innovation with automation you can trust. Read how in this ebook.

My friends in college always made fun of my keyboard obsession. At the time, I knew all the Windows 98 specific shortcut keys and often had no need for the mouse. Keyboard shortcuts still rule in my book. It is amazing that you can get around without using a mouse at all. Master the following Visual Studio shortcuts and your colleagues might stare at you with amazement.

  1. F5: Start your project in debug mode

  2. F7 & Shift-F7: Show the code windows & Show the designer window

  3. Alt-Enter: Show the properties panel for a selected object (this is general Windows shortcut that can be used on files and directories)

  4. F6 / Shift-F6 / Ctrl-Shift-B: Build solution / Build project / Build solution

  5. Shift-Alt-C: Add a new class to your project

  6. Ctrl-K + Ctrl-C: Comment a selected block of code

  7. Ctrl-K + Ctrl-U: Un-comment a selected block of code

  8. Ctrl-M + Ctrl-O / Ctrl-M + Ctrl-P: Collapse all code to definitions / Expand all code (stop collapsing)

  9. Ctrl-M + Ctrl+M: Expend or collapse a selected code fragment. The code collapsed depends on where the cursor is located

  10. Ctrl-B + Ctrl-T: Toggle code bookmark

  11. Ctrl-Alt-P: Attach the debugger to a process. This is insanely useful for debugging ASP.NET web sites without having to start the project in debug mode

  12. Ctrl-Alt-L: Show the solution explorer

  13. Ctrl-Shift-A / Alt-Shift-A: Add a new item to your project / add an existing item to your project


The above list is my top 13. Did I miss any essential ones? What are yours?


The following work in Visual Studio just like they do in most other Windows application.

Ctrl-N: Add a new file

Ctrl-S: Save file

Ctrl-Z / Ctrl-Y: Undo typing / Redo typing

Ctrl-F: Bring up the "Find" dialog

Ctrl-H: Bring up the "Replace" dialog

Ctrl-Tab: Scroll forward through open windows

Ctrl-Shift-Tab: Scroll backwards through open windows

The DevOps Zone is brought to you in partnership with Sonatype Nexus.  See how the Nexus platform infuses precise open source component intelligence into the DevOps pipeline early, everywhere, and at scale. Read how in this ebook

visual studio

Published at DZone with permission of Boyan Kostadinov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}