c++visual-studiovisual-c++visual-studio-2017visual-assist-x

What's a fast way to see if a function is public?


Debugging around a large VS2017 project, I often find myself switching to a header file and searching/scrolling just to see if a function is public or not.

There must be a really quick way to check this, but I'm obviously missing the right words to hit with Google... searches are being drowned out by results for general visibility teachings.

I also use Visual Assist so maybe that has an answer that VS doesn't.

What's the minimum-clicks way to see a function's visibility, at the call site or definition?


Solution

  • Place the cursor at the end of the function's name (immediately after the last character of the function name, before the open parentheses of the function call and before any spaces between the function name and the parentheses) then type CTRL+J to Force Show Intellisense.

    Intellisense should come up focused on the function name and will show the full function signature and access. In the screenshot below the cursor was between the 'c' ending Func and the parentheses.

    screenshot of Intellisense

    You can place the cursor anywhere in the function name and get some sort of result but Intellisense will only consider the characters before the cursor which may result in focus being on the wrong class member.