Did you know… You can press Ctrl+, D to view the Code Definition Window – #354
Now before I get the angry emails on my first day back from vacation, I will say up front that there is no love for VB in today’s tip. This is just for C#. As a VB developer from my SDET days, I feel your pain and encourage you to vote for this functionality in VB on the Connect site. If someone finds an open bug, let me know and I’ll post it here.
In the General Development Settings, the keyboard shortcut for the Code Definition Window is Ctrl+\, D. The command is View.CodeDefinitionWindow, in case your keyboard bindings differ.
Instead of doing an Edit.GoToDefinition, the Code Definition Window does it for you. Whenever you are on an object, the Code Definition Window will automatically update to show the definition. Kinda cool, huh? (even though the VB developers are grinding their teeth right now.)
Technorati Tags: VS2005Tip,VS2008Tip
Comments
Anonymous
November 11, 2008
I know I'm off topic with this reply, but I did replied in the right place some time ago: I have a really annoying problem with my Visual Studio ctrl+tab window that somehow get stuck (I've tried to enable/disable the sticky keys several times without any result). Please help me with this problem (you are my last hope ;) ), Thanks a lot!Anonymous
November 11, 2008
Wow! Great tip! Using Ctrl+ is not such a good idea though: Not international aware. On my belgian-french keyboard, is Ctrl+Alt+<. So how do I type Ctrl+ ? Fortunately, it's easy to remap the tool.Anonymous
November 11, 2008
ahem It works just fine (usually) for C++, too.Anonymous
November 11, 2008
Is there a way to make it display the source code for .NET Framework classes also? i.e. not just the declarations, but, the source code itself. I know you can debug into it if you change some settings, but, goto definition doesn't work.Anonymous
November 11, 2008
Dang, I never knew about the Code Definition window. Thanks!Anonymous
November 11, 2008
Says it all. I know, I know, C/C++ is its own punishment and I still love the sense of simplicity and mastery I have with it. (Not all the C++ cruft, the heart of it.) But the Visual Studio support is a seriously-different fork.Anonymous
November 11, 2008
Great tip...but the Code Defintion window comes up in illegible colors....couldn't find a setting in Tools | Options | Fonts & Colors to change them...any suggestions....? Thanks....Anonymous
November 11, 2008
I never knew about the Code Definition window either... thanks!Anonymous
November 11, 2008
Awesome tip here. I keep forgetting that.Anonymous
November 12, 2008
Awesome tip, I'm always using Go to definition!! Thanks Sara!!!Anonymous
November 13, 2008
I never understood what the purpose of the Code Definition Window is?Anonymous
November 13, 2008
The comment has been removedAnonymous
November 20, 2008
We can also use F12 to go to the definition of a function.