GitHub Copilot in Visual Studio gains smart completions, memory, and C++ modernization tools
Smarter Code Completions & User Control
Visual Studio 2026 now displays code completions with syntax highlighting and supports partial acceptance—users can click to accept only the portion of a suggestion they need, or use Ctrl+right arrow for word-by-word adoption. This gives developers fine-grained control over AI-generated code while maintaining visual distinction through lower opacity and italic styling.
Copilot Memory & Custom Commands
Two new productivity features streamline workflow:
- Copilot Memories automatically detect and save coding standards and preferences, applying them consistently across all chat sessions at personal or repository level
- Slash commands (
/generateInstructions,/savePrompt) allow rapid invocation of custom prompts directly from the/menu in Copilot Chat
Expanded Agent Ecosystem
The update adds purpose-built agents for specialized tasks:
- @Test agent: Generate and refine unit tests for C# code, supporting xUnit, NUnit, and MSTest
- WinForms expert agent: Guidance on designer patterns, modern .NET 8–10 practices, layout, and exception handling
- @BuildPerfCpp agent (preview): Uses Build Insights to identify C++ build bottlenecks and suggest optimizations
- @Modernize agent (preview): Assists with upgrading C++ projects to latest MSVC versions
- @Profiler agent: Enhanced to discover and run existing unit tests for performance validation
Debugging & Integration Improvements
New debugging capabilities include:
- Analyze Call Stack button in the debugger sends current execution state to Copilot for instant explanation and frame annotation in sync/async stacks
- NuGet MCP server identifies package vulnerabilities, updates dependencies, and targets specific versions via natural language
- Markdown preview in Copilot Chat displays rendered content directly in Visual Studio's Markdown editor without copy-pasting