In November, we introduced C++ code editing tools for GitHub Copilot as a Private Preview, focusing on partnering with customers to tackle one of the common, taxing challenges for C++ development: refactoring at scale. Since then, we’ve listened to feedback and refined our tooling to make wide-sweeping C++ edits easier.
“With C++ code editing tools for GitHub Copilot in Visual Studio, we’ve seen noticeably better overall results, with fewer errors and faster processing on large projects.” – Software engineer (from our Private Preview)
We’re excited to announce that C++ code editing tools for GitHub Copilot are now available to all C++ users in the latest version of Visual Studio 2026 Insiders.
C++ code editing tools for GitHub Copilot
Refactoring at scale is a time-consuming and error-prone process for C++ developers. Traditionally, developers relied on manual searches and incremental edits across multiple files to accomplish these tasks.
With these C++ code editing tools, Copilot goes beyond file searches and unlocks greater context-aware refactoring that enables changes across multiple files and sections.
The C++ code editing tools provide rich context for any symbol in your project, allowing Copilot agent mode to:
- View all references across your codebase
- Understand metadata such as type, declaration, and scope
- Visualize class inheritance hierarchies
- Trace function call chains
This helps Copilot accomplish complex editing tasks, reducing the traditionally manual effort required to perform refactoring tasks by improving the accuracy and speed of these operations.
Getting started
To get started with these tools
- Open your C++ project and ensure you have IntelliSense enabled
- Navigate to Tools > Options and turn on the visibility of the tools via GitHub > Copilot settings. You may need to close and re-open your solution for the tools to populate after this step.

- Enable any or all tools via the “Tools” icon in Copilot Chat
-
Note: Tool names and UI may evolve during the Public Preview and are subject to change.
Example scenarios
All examples below were showcased using bullet3, an open-source C++ physics simulation engine.
1. Add additional functionality to existing functions
As applications evolve, you often need to enhance existing functions without breaking current behavior. This can include adding logging or performance metrics.
These tools help the agent quickly identify all relevant references, ensuring complete and accurate updates for feature additions.
2. Improve memory management
Inefficient memory handling leads to performance bottlenecks, excessive copies, and unclear ownership semantics. When making these updates, these tools can help identify all relevant references and ensure all type changes are updated to verify code compiles without errors.
3. Visualizing unfamiliar code
C++ code can often have intricate structures and dependency mapping. In a large, unfamiliar codebase, onboarding to a task can often be very time-consuming.
The C++ tools can help identify all relevant class structures and symbol information to produce a visualization of a given set of C++ symbols in a library or file, easing your onboarding process.
Best practices
- Choose the right model for the job: Models that are optimized for tool-calling will perform best with our tools. To learn more about the models available, please visit these docs: AI model comparison – GitHub Docs
- Be specific with prompts: Being specific with prompts and breaking vague tasks into clear intent and context will improve the tool calling and performance. Specify symbols explicitly when possible.
Share your feedback
We’d love to hear feedback on how we can improve the C++ tooling experience. Please report problems or suggest improvements through the Visual Studio feedback icon.
What’s next
We’re looking to evolve our integration with Visual Studio tools and expand this support to other Copilot surfaces, like Visual Studio Code, to further empower agent-driven edits for C++. Stay tuned for updates!






0 comments
Be the first to start the discussion.