Here are a few non-trivial
tips for .NET developers. The first ones are from the excellent blog of Sara
If you don’t know her work, I would advise you should go and also read her
book: Visual Studio Tips which is a collection of here first 250 tips. Sara is a
tester in the VS team and her passion is to discover and spread the word about
advanced VS tips. I learned plenty of tricks but here are some that positively
affect my habits:
- Ctrl+I: The power of Incremental Search
- Cycle through the Clipboard ring to paste different
- Double click on Properties in Solution Explorer
- Track Active Source File in Solution Explorer
- Show the Miscellaneous Files Project in the
- Box/Column selection in the code editor (ok this one I know for a long time but it is a sooo cool).
Also, I have 2 tricks that
my colleagues found useful to learn so I wanted to spread the word:
When you are debugging an
application you can use the cool possibility to set a conditional breakpoint.
But what if you want the
same facility on a non-currently-debugged
process? This situation happens especially when debugging a multi-process
application. You might want to debug a process in a particular situtation while
doing smoke-tests. You just have to use
a temporary Debug.Assert( put your condition here ).
Simple but efficient! The only risk is to forget to remove this assertion. Not such
a big deal since assertions are absent in release code but still. Personally I
took the habit to put a // TODELETE
comment tag and then check before each release is such a tag is in the code.
Another trick relevant if
you have several VS solutions opened. One source file you are currently
debugging in VS instance A might not be part of the VS solution currently
opened. Thus you would like to open the source file from VS instance B that
contains the parent VS solution. For such situation you can copy the full path
of the source file in VS instance A…
…and then open it
(Ctrl+O) from VS instance B. Also, in case you didn’t
know, pasting the full path and then click open just works.