Understand your C++ symbols using Copilot in Visual Studio’s Quick Info

Sinem Akinci

Navigating your codebase and forget what exactly that method does? Looking for quick, easy-to-digest information on your code at any point in your development journey?

We are excited to announce that now when you hover over symbols in your codebase, you’ll have the ability to invoke Copilot conveniently within the Quick Info dialog to learn more about a given symbol and enhance existing or lacking code documentation.

How it works

Normally, in the Quick info window, you would see comments or xml documentation if it was generated by your team in the code, which can sometimes be unrelated to what the given symbol does. Copilot can help augment existing documentation or lacking documentation.

Just hover over your symbol of interest and click on the link to learn more about what it does in natural language, rather than having to go to the definition and parse through all the code.

A symbol called Outfit Choices, that has a link to Tell Me More over it

Copilot provided a definition of what OutfitChoices function does in Visual Studio's quick info

Copilot uses the declaration and definition of the given symbol to provide you an understanding of it at any invocation.

For example, when working with unfamiliar library code, there is often context from the source code of the symbol definition to infer the purpose of the symbol.

Tell me more link over an unfamiliar section of library code called "enable_bsl_summary_mode"

The "enable_bsl_summar_mode" function with some Copilot-generated info

Try it out

While we make some final fixes to this feature, you may notice that it’s not enabled by default in your installation of Visual Studio. If you’d like to try it out, just go to Tools > Options > GitHub > Copilot and check the box labeled “Enable on-the-fly documentation for C++” (in 17.10) or “Enable Copilot-generated summaries in quick info for C++” (in 17.11), then restart Visual Studio.

Setting name for otf docs

Stay tuned for upcoming support for other languages and please let us know anything you’d like to see added to this feature. You’ll need an active GitHub Copilot subscription. Download the latest version of Visual Studio and give it a try.

In addition, our team is working hard on improving C++ integrations with Copilot Chat, so please let us know any other enhancements you’d like to see to your C++ workflows and content you’d like to see.

We welcome all types of feedback on your experience with the product. Comment below, or you can find us via email at visualcpp@microsoft.com or via X at @VisualC.

1 comment

Leave a comment

  • Tom Kirby-Green 0

    Really, really appreciate all the native coding investments. Keep going!

Feedback usabilla icon