My favourite Visual Studio shortcuts and tips & tricks

Gürçağ Yaman
3 min readDec 10, 2023

--

I would like to share with you all how I use Visual Studio, how I customise it and what are my favourites about it.

The first version of Visual Studio I started using was 2008 and the most recent I am currently using is 2022.

Before I start, to introduce myself briefly, while using the PC, I’d like to apply my own customisations to the applications I use often and learn and use many handy shortcuts.

Pinned Tabs

pinned tabs as a separate row over the other tabs

When I created a new project, I always pin several files (can be seen above) to access them easily. Another common use case is, particularly when about to start a new task at work, just close all files then only pin files that I will work on them.

To apply the setting: Tools > Options > Environment > Tabs and Windows

Enable these checkboxes: “show pinned tabs in a separate window” and “show pin button on unpinned tabs”

Debugging Windows

To become a master while debugging, I highly recommend these 4 windows: Call Stack, Immediate Window, Debug Output and C# Interactive.

To learn from the original source or to be up to date, MSDN links are above.

Keyboard Shortcuts

Photo by Syed Ali on Unsplash

While my hands are on the keyboard, having to use the mouse interrupts and slows me. This is why I’d like to use keyboard shortcuts. The complete list is here msdn link.

  • Shift + Alt + P: reattach to process the most recent one.
  • Shift + F9: while debugging open the QuickWatch window for the selected variable.
  • Ctrl + [ + S: jump to the file on Solution Explorer that is currently opened on the editor.
  • Ctrl + M + M: collapse the block. When I see a file for the first time, I collapse all the methods to recognize what it is used for.
  • Ctrl + M + O & Ctrl + M + L: open the collapsed block or uncollapse the whole file.
  • Ctrl + K + C & Ctrl + K + U: comment and uncomment row or selected block even in-line.
  • Ctrl + F12: go to the implementation for the selected interface.
  • Shift + F12: find all references for the selected variable.
  • Ctrl + Enter: insert a new line above instead of below.
  • Ctrl + W + S: open the Solution Explorer.

--

--

Gürçağ Yaman

🎓B. Sc. in Mathematical Engineering @ YTU & 💻 Software Engineer