views:

402

answers:

6

Possible Duplicate:
Hidden Features of Visual Studio (2005-2008)?

I am a C++ programmer and I program in Visual Studio 2008 with wonderful VisualAssist plugin. I've used this IDE a lot and know quite a bit about it but nevertheless I find a new features or I realize new ways of using known features from time to time. They were quite a time-savers sometime.

So the question is: do you know not-so-obvious but useful features of Visual Studio 2008? If you do then share them please. We all be glad to learn some!

Edit: I've closed question. See http://stackoverflow.com/questions/100420/hidden-features-of-visual-studio-2005-2008

+1  A: 

For a long time I didn't know that Visual Studio Editor supports rectangular selection. Just select text block with a mouse while holding ALT.

Sergey Skoblikov
I didn't know that either... Useful!
pyrochild
its not just visual studio that supports this... try it in word!
Jon Erickson
A: 

It's not really a plugin but Qt. It allows you to make Qt Applications using the VC++ IDE.

Lucas McCoy
A: 

Multiple copy/paste buffers:

VS actually stores multiple clipboard entries for copied text. Just press Ctrl + Shift + V to cycle through them.

Keybaord commands:

Go to the tools menu and t hen customize, then browse the list of commands. You can set a keyboard shortcut to any of these.

Text editor stuff:

Here are some other small ones relating to the text editor

  • Tabbing multiple lines (and un-tabbing them) just by selecting the text and pressing tab (or shift tab).
  • Ctrl + } to go to the matching brace.
  • Ctrl + right or Ctrl + left to go to the next or previous word
  • Ctrl + g go to line number
  • Ctrl + i for interactive search, search as you type.
  • Ctrl + tab to cycle through the files in your project. Very useful when going back and forth between 2 files.
  • Ctrl + shift + space gets a function's definition
  • Ctrl + space gets intellisense for the item you have.
  • Ctrl + shift + U and Ctrl + U to get upper and lowercase of your selection

Non trivial breakpoints:

Another simple tip but you can set expressions and hit counts on your breakpoints so they only get hit when those conditions are satisfied.

You can also do a trace instead of stopping the code at that breakpoint by going into the When Hit option of the breakpoint.

Searching through your files with regular expressions:

You can use regular expressions in the find dialog.

Brian R. Bondy
+3  A: 

Sara Ford's Visual Studio 2008 Tip of the Day series was an excellent source of this kind of information.

Iceman
A: 

Not sure what you're looking for. My observations is that many VS devs don't use shortcuts effectivly, resorting to the mouse often.

Some favorite Shortcuts i use a lot:

  • ctrl+w - select word
  • ctrl+-/ctrl+shit+- - navigate to last cursor position
  • ctrl+alt+down - open file list
  • ctrl+I - incremental search
  • ctrl+. = smart tag (little square when e.g. renaming a var to get to the refactor menu in c#, less useful in c++)
  • ctrl+alt+p - attach to process
  • ctrl+a -> ctrl+k, ctrl-f - select all, then format
  • ctrl+k, ctrl+c - comment selection
  • ctrl+k, ctrl+u - uncomment selection

with free devexpress tools:

  • alt+arrow - camel case navigation
  • alt+arrow+shift - camel case navigation with selection (personal favorite)

General:

  • Create your own code snippets, it's easier than macros and quite useful :)
  • trace points (non breaking but tracing breakpoints)
  • conditional break points
  • enabling .net framework source stepping (for the .net devs)
  • know when it's time to switch to windbg for debugging
Ben Schwehn
ugh conditional breakpoints are soooo slow
pyrochild
A: 

With a little bit of tweaking, you can get your Compact Framework applications to deploy to your desktop instead of to the device/emulator. This makes debugging CF much nicer.

Daniel Moth has a great blog post on the subject.

http://www.danielmoth.com/Blog/2005/01/deploy-to-my-computer.html

mliesen