问题
When I press F12 then I get h-file with function prototype. But I want get function body. I didn't find any context menu item which does it. So I am forced to find function body manually that sometimes is hard.
回答1:
F12 goes to the function body if InteliSense knows where it is.
The source code of the function body must be part of the VS solution.
Note that Intelisense is known to have bugs so it's not working as expected 100% of the time.
回答2:
If you are using Visual Studio 2010 or later then you can also use the great Navigate To command (on the Edit menu or Ctrl+,) which will show you the declaration and definition.
回答3:
By default
Right Click -> Go to Definition
or
F12
works.
But If its not working fine, may be there is some redundancy/ name conflicts. You need find that out.
来源:https://stackoverflow.com/questions/22015905/c-how-to-go-to-function-body-from-calling-line-in-visual-studio