{"id":36545,"date":"2026-05-27T19:51:16","date_gmt":"2026-05-27T19:51:16","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=36545"},"modified":"2026-05-27T19:51:16","modified_gmt":"2026-05-27T19:51:16","slug":"whats-new-for-c-developers-in-visual-studio-2026-18-1-18-6","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/whats-new-for-c-developers-in-visual-studio-2026-18-1-18-6\/","title":{"rendered":"What&#8217;s New for C++ Developers in Visual Studio 2026 (18.1 &#8211; 18.6)"},"content":{"rendered":"<p>Visual Studio 2026 versions 18.1 through 18.6 deliver a wave of improvements for C++ developers. For MSVC Build Tools, the v14.51 release is now generally available with runtime performance gains and improved C++23 conformance. We also introduced Sample Profile Guided Optimization to help you improve the runtime performance of your C\/C++ programs. In the IDE, we made significant investments in AI-powered experiences to optimize your builds, modernize your code, debug and profile, and more. We enhanced Copilot Chat to make it easy to incorporate skills, custom agents, and MCP servers into your workflow. We also added a few productivity features to save you time. This post summarizes what shipped and how you can take advantage of it today. If you also want to catch up on what shipped in 18.0, see <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/whats-new-for-cpp-developers-in-visual-studio-2026-version-18-0\">What\u2019s New for C++ Developers in Visual Studio 2026 version 18.0<\/a>. For the full, condensed list of what\u2019s new in Visual Studio 2026, take a look at the <a href=\"https:\/\/learn.microsoft.com\/visualstudio\/releases\/2026\/release-notes\">release notes<\/a>.<\/p>\n<h2>Bug fixes<\/h2>\n<p>We fixed <strong>416 C++ bugs<\/strong> during the 18.1 \u2013 18.6 timeframe, over the past 6 months, across the Visual Studio IDE and MSVC Build Tools. Please continue to report bugs to us via the menu at Help &gt; Send Feedback &gt; Report a Problem in the IDE or on <a href=\"https:\/\/developercommunity.visualstudio.com\/index.html\">Developer Community<\/a>.<\/p>\n<h2>Productivity power-ups<\/h2>\n<p>Let\u2019s start with some simple features that can save you time when performing common actions in the IDE:<\/p>\n<ul>\n<li><strong>Fast scrolling:<\/strong> hold Alt while scrolling the mouse wheel to move through large files quickly<\/li>\n<li><strong>Middle-click scroll:<\/strong> press the scroll wheel and move the mouse for rapid navigation through large files<\/li>\n<li><strong>HTML rich copy\/cut:<\/strong> paste syntax-highlighted code into Word, Outlook, Azure DevOps work items, and other HTML-based controls<\/li>\n<\/ul>\n<h2>Microsoft C++ (MSVC) Build Tools v14.51<\/h2>\n<p>MSVC Build Tools version 14.51 is now available and installed by default with the C++ desktop and gaming workloads. See the <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/msvc-build-tools-version-14-51-release-candidate-now-available\/\">Release Candidate<\/a> blog post for more information on what\u2019s new. For a deep dive on specific topics, see <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c23-support-in-msvc-build-tools-14-51\/\">C++23 Support<\/a>, <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c-performance-improvements-in-msvc-build-tools-v14-51\/\">C++ Performance Improvements<\/a>, and <a href=\"https:\/\/github.com\/microsoft\/STL\/wiki\/Changelog#msvc-build-tools-1451\">STL Changelog<\/a>. The v14.51 release will receive 9 months of servicing, <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/new-release-cadence-and-support-lifecycle-for-msvc-build-tools\/\">as previously announced<\/a>.<\/p>\n<h2>Sample Profile Guided Optimization<\/h2>\n<p>We introduced <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/introducing-sample-profile-guided-optimization-in-msvc\/\">Sample Profile Guided Optimization<\/a> (SPGO), a new approach to profile-guided optimization that makes it easier to bring PGO quality optimizations to your codebase without the overhead and complexity of traditional instrumentation. SPGO is available in all versions of Visual Studio 2022 and Visual Studio 2026.<\/p>\n<p>Instead of instrumenting your binary and running it through synthetic training scenarios, SPGO uses hardware performance counter sampling collected from your actual release binaries. These can be collected with negligible runtime overhead while giving you much more flexibility in where and how you collect data. With this feature, you may be able to achieve <strong>5-15% runtime performance improvements<\/strong> for your C\/C++ applications.<\/p>\n<h2>Easily upgrade and modernize your C++ projects<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/github-copilot-app-modernization-cpp-public-preview\/\">GitHub Copilot modernization for C++<\/a> (currently in Public Preview) helps you update your projects to the latest MSVC Build Tools version and resolve upgrade-related issues. It works with both MSBuild (.sln) and CMake projects. Access it by typing @Modernize in Chat, right-click the solution in Solution Explorer, or use <strong>Project &gt; Retarget solution<\/strong>. Copilot upgrades your project settings, fixes compiler errors and warnings, and generates a detailed migration report.<\/p>\n<p><img decoding=\"async\" width=\"1620\" height=\"1315\" class=\"wp-image-36546\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c.webp\" alt=\"The image displays a GitHub Copilot Chat message confirming the successful completion of a C++ build tools upgrade, specifically addressing and resolving a warning C4874 in the GraphControl component.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c.webp 1620w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c-300x244.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c-1024x831.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c-768x623.webp 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-message-c-1536x1247.webp 1536w\" sizes=\"(max-width: 1620px) 100vw, 1620px\" \/><\/p>\n<h2>Optimize your builds<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/now-in-public-preview-github-copilot-build-performance-for-windows\/\">GitHub Copilot build performance for Windows<\/a> (currently in Public Preview) uses Build Insights to identify and fix C++ build performance issues. It now supports iterative build analysis, detecting cases where optimizations like precompiled headers show gains in day-to-day incremental builds rather than full rebuilds. You can also <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/project-specific-build-optimizations-with-github-copilot\/\">target a specific project for analysis<\/a>. Either mention the project in your prompt or select it in Solution Explorer and choose Run Build Insights on Selection &gt; Improve Build Performance from the context menu.<\/p>\n<p>To get started, open a C++ project, then, with Copilot Agent Mode enabled, ask @BuildPerfCpp in Chat to optimize your build time. The agent can:<\/p>\n<ul>\n<li>Create precompiled headers and optimize include paths<\/li>\n<li>Refactor functions to reduce parsing time<\/li>\n<li>Modernize code to use faster-compiling language features<\/li>\n<li>Optimize parallel build and linker settings<\/li>\n<\/ul>\n<h2>Context-aware refactoring at scale<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/c-code-editing-tools-for-github-copilot-now-in-public-preview\/\">C++ code editing tools for GitHub Copilot<\/a> (Generally Available) allow you to perform refactoring operations across multiple files with semantic intelligence.<\/p>\n<p><img decoding=\"async\" width=\"546\" height=\"213\" class=\"wp-image-36548\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/list-of-available-c-tools-in-copilot-chat-settin.webp\" alt=\"List of available C++ tools in Copilot Chat settings\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/list-of-available-c-tools-in-copilot-chat-settin.webp 546w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/list-of-available-c-tools-in-copilot-chat-settin-300x117.webp 300w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><\/p>\n<p>When enabled via the Tools icon in Copilot Chat, Copilot can map out class inheritance hierarchies and follow function call chains. In addition, GitHub Copilot includes many built in tools that also apply to C++ codebases.<\/p>\n<p><img decoding=\"async\" width=\"743\" height=\"700\" class=\"wp-image-36549\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario.webp\" alt=\"Image of list of available built-in tools in Copilot Chat settings, including 'find_symbols'\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario.webp 743w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-300x283.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-24x24.webp 24w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><\/p>\n<p>In particular, find_symbol allows you to find all references to symbols across your project and access type information, declarations, and scope metadata.<\/p>\n<p>Using these tools and more, you can work with Copilot using the same semantic intelligence used to power IntelliSense in Visual Studio.<\/p>\n<p><img decoding=\"async\" width=\"1073\" height=\"742\" class=\"wp-image-36550\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-depicts-a-user-interface-in-a-software-d.webp\" alt=\"Image depicting changing the types of two symbols in GitHub Copilot Chat using the get_symbol_references tool\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-depicts-a-user-interface-in-a-software-d.webp 1073w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-depicts-a-user-interface-in-a-software-d-300x207.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-depicts-a-user-interface-in-a-software-d-1024x708.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-depicts-a-user-interface-in-a-software-d-768x531.webp 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/p>\n<h2>A more sophisticated AI chat experience<\/h2>\n<h3>Agent skills<\/h3>\n<p>Copilot agents now automatically discover and use <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/agent-skills-in-visual-studio\/\">Agent Skills<\/a>, reusable instruction sets that teach agents how to handle specific tasks like running a build pipeline, generating boilerplate, or following your team&#8217;s coding standards. Define skills as <em>SKILL.md<\/em> files, which can be present in any of the following locations to be detected by Visual Studio:<\/p>\n<p>Team skills (in your solution\/workspace directory):<\/p>\n<ul>\n<li><em>your-workspace\/.github\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<li><em>your-workspace\/.claude\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<li><em>your-workspace\/.agents\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<\/ul>\n<p>Personal skills (in your user profile):<\/p>\n<ul>\n<li><em>%USERPROFILE%\/.copilot\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<li><em>%USERPROFILE%\/.claude\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<li><em>%USERPROFILE%\/.agents\/skills\/skill-name\/SKILL.md<\/em><\/li>\n<\/ul>\n<p><img decoding=\"async\" width=\"416\" height=\"398\" class=\"wp-image-36551\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-1.webp\" alt=\"Image displaying the Skills selection menu in the Copilot Chat settings. Four skills are displayed: code-comments, generate-unit-tests, headers-to-modules, static-analysis-checks\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-1.webp 416w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-1-300x287.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-interface-with-vario-1-24x24.webp 24w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/p>\n<p>A new Skills panel in the chat window lets you browse, edit, search, and locate all your skills. If you\u2019re looking for skills or agents to try, check out the <a href=\"https:\/\/github.com\/github\/awesome-copilot\">awesome-copilot<\/a> repo.<\/p>\n<h3>Custom agents<\/h3>\n<p>Alongside the built-in agents available in Visual Studio by default, you can now define <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-march-update-build-your-own-custom-agents\/\">custom Copilot agents<\/a> tailored to your workflow. Simply add an <em>.agent.md<\/em> file under <em>.github\/agents<\/em> in your repo to get started, and you should see it start appearing at the bottom of the agents list in Copilot Chat (below the built-in agents).<\/p>\n<p><img decoding=\"async\" width=\"609\" height=\"487\" class=\"wp-image-36552\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-development-interfac.webp\" alt=\"Image displaying the Agents menu in the Copilot Chat interface, including a list of built-in and custom agents. The custom agents listed are C++ Engineer, Code Review Expert, and Repo Librarian.\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-development-interfac.webp 609w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-software-development-interfac-300x240.webp 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>Custom agents have full access to workspace awareness, code understanding, tools, your selected model, and MCP connections. For example, you might create a custom agent that enforces your coding standards during code review, or one that has a detailed understanding of your codebase and architecture.<\/p>\n<h3>Plan before you build<\/h3>\n<p>The new <strong>Planning<\/strong> chat mode lets you collaborate with Copilot on an implementation plan before making code changes. Copilot uses read-only tools to explore your codebase, asks clarifying questions, and drafts a plan saved as <em>.copilot\/plans\/plan-{title}.md<\/em>. When ready, click <strong>Implement plan<\/strong> to hand it off to Agent mode. This is especially useful for complex operations, such as large C++ refactoring tasks, where you want to think through things like header dependencies and build impacts before committing.<\/p>\n<p><img decoding=\"async\" width=\"609\" height=\"160\" class=\"wp-image-36553\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/word-image-36545-8.webp\" alt=\"Image displaying Copilot Chat with Planning mode turned on\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/word-image-36545-8.webp 609w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/word-image-36545-8-300x79.webp 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/p>\n<h3>Cloud agent integration<\/h3>\n<p>You can start <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-april-update-cloud-agent-integration\/#cloud-agent-integration\">cloud agent sessions<\/a> directly from Visual Studio. Select <strong>Cloud<\/strong> from the agent picker to delegate tasks like multi-file refactors, documentation updates, or tedious edits. The cloud agent creates a GitHub issue, generates a pull request, and notifies you when done.<\/p>\n<p><img decoding=\"async\" width=\"366\" height=\"368\" class=\"wp-image-36554\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i.webp\" alt=\"Image displaying the menu option to start a remote coding session with a cloud agent in the Copilot Chat interface\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i.webp 366w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i-298x300.webp 298w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i-150x150.webp 150w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i-24x24.webp 24w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i-48x48.webp 48w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-haiku-4-5-v-ai-generated-content-may-be-i-96x96.webp 96w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/p>\n<h3>Multi-file summary diff<\/h3>\n<p>When Copilot edits multiple files, you don\u2019t need to review each one separately anymore. Click <strong>Open Changes Summary<\/strong> in the Chat working set to review all changes in a single view.<\/p>\n<p><img decoding=\"async\" width=\"795\" height=\"453\" class=\"wp-image-36555\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-opus-ai-generated-content-may-be-incorrect.webp\" alt=\"Image displaying the button in the Copilot Chat interface to open a change summary view. This is visible after Copilot changes some files in Agent mode alongside the list of files that were added or modified\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-opus-ai-generated-content-may-be-incorrect.webp 795w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-opus-ai-generated-content-may-be-incorrect-300x171.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/claude-opus-ai-generated-content-may-be-incorrect-768x438.webp 768w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/p>\n<p>You can accept or undo changes at the all-files, per-file, or per-chunk level. <img decoding=\"async\" width=\"1834\" height=\"1447\" class=\"wp-image-36556\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo.webp\" alt=\"A code snippet displaying the class definitions for Bus and Car, including constructors, member functions, and private attributes. As the developer, you have the option to keep or undo any or all of the modified files or chunks of code\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo.webp 1834w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo-300x237.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo-1024x808.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo-768x606.webp 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/a-code-snippet-displaying-the-class-definitions-fo-1536x1212.webp 1536w\" sizes=\"(max-width: 1834px) 100vw, 1834px\" \/><\/p>\n<h3>MCP (Model Context Protocol) support<\/h3>\n<p>Visual Studio now has comprehensive MCP support, letting Copilot connect to external tools and knowledge sources. For example, you could connect to MCP servers for things like managing build system diagnostics, custom analysis tools, package managers, or documentation wikis.<\/p>\n<p><img decoding=\"async\" width=\"610\" height=\"464\" class=\"wp-image-36557\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/mcp-server-management-ui-showing-configuration-opt.webp\" alt=\"Image of MCP server management UI showing configuration options\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/mcp-server-management-ui-showing-configuration-opt.webp 610w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/mcp-server-management-ui-showing-configuration-opt-300x228.webp 300w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>The following MCP features are available in Visual Studio 2026:<\/p>\n<ul>\n<li>Unified server management UI for configuring, authenticating, and monitoring MCP servers<\/li>\n<li>Server instructions: view system prompts shipped with MCP servers to understand their tools<\/li>\n<li>Elicitations and sampling: MCP servers can request additional information during interactions<\/li>\n<li>Enterprise governance: admins set allowlist policies through GitHub to control permitted servers<\/li>\n<\/ul>\n<h3>Other Copilot features<\/h3>\n<ul>\n<li><strong>Click to accept:<\/strong> You can click into a Copilot autocompletion suggestion to accept it up to your cursor position<\/li>\n<li><strong>Copilot memories:<\/strong> detects and saves your coding preferences across sessions, teaching Copilot your C++ style<\/li>\n<li><strong>Custom prompts<\/strong> via \/ commands, including <em>\/generateInstructions<\/em> and <em>\/savePrompt<\/em> for reusable prompts<\/li>\n<li><strong>IntelliSense priority:<\/strong> IntelliSense now suppresses Copilot completions while active, reducing distraction<\/li>\n<li><strong>New chat history panel<\/strong> with titles, message previews, and timestamps<\/li>\n<li><strong>Preview Markdown from Copilot Chat<\/strong> directly in the VS Markdown editor<\/li>\n<li><strong>Context window indicator:<\/strong> see how much context Copilot is using and summarize to free space<\/li>\n<\/ul>\n<h2>Debugging and diagnosing code issues<\/h2>\n<h3>Debugger Agent: agentic issue to resolution<\/h3>\n<p>The new <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/stop-hunting-bugs-meet-the-new-visual-studio-debugger-agent\/\">Debugger Agent workflow<\/a> validates bugs against real runtime behavior instead of relying on static analysis.<\/p>\n<p><img decoding=\"async\" width=\"741\" height=\"521\" class=\"wp-image-36558\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-interface.webp\" alt=\"Image displaying the GitHub Copilot Chat interface using the Debugger Agent. Offers assistance with diagnosing and fixing bugs, analyzing exceptions, understanding call stacks, and suggesting breakpoints\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-interface.webp 741w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/the-image-displays-a-github-copilot-chat-interface-300x211.webp 300w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><\/p>\n<p>Start from a GitHub or Azure DevOps issue or describe the bug in natural language using Debugger Mode (dropdown in the lower-left corner of Chat). The agent:<\/p>\n<ul>\n<li>Analyzes the bug description and creates a minimal reproduction scenario<\/li>\n<li>Generates hypotheses and instruments your app with tracepoints and conditional breakpoints<\/li>\n<li>Runs the debug session and analyzes live data to isolate the root cause<\/li>\n<li>Suggests a precise fix at the exact failure point<\/li>\n<li>Lets you validate the fix in the live environment<\/li>\n<\/ul>\n<h3>Analyze Call Stack with Copilot<\/h3>\n<p>A new <strong>Analyze Call Stack<\/strong> button in the Call Stack window sends your current debug state to Copilot. It understands both synchronous and asynchronous call stacks, annotates relevant frames, and explains why execution is paused, what the thread is waiting on, and how it got there.<\/p>\n<h3>Profiler Agent with C++ unit test support<\/h3>\n<p>The Profiler Agent now supports unit test workflows, making it directly applicable to C++ scenarios where dedicated benchmarks are not always practical. The agent discovers relevant unit tests that exercise performance-critical code paths, runs them with profiling, and suggests targeted optimizations in a guided loop. If no suitable tests exist, it creates a lightweight measurement artifact to capture baseline metrics.<\/p>\n<p><img decoding=\"async\" width=\"1111\" height=\"625\" class=\"wp-image-36559\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/visual-studio-profiler-agent-running-unit-tests-to.webp\" alt=\"Visual Studio Profiler Agent running in response to a user request: @Profiler Suggest how I can optimize my code. The agent begins by outlining a plan to identify the scope of optimization, establish a performance baseline, and implement targeted optimizations\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/visual-studio-profiler-agent-running-unit-tests-to.webp 1111w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/visual-studio-profiler-agent-running-unit-tests-to-300x169.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/visual-studio-profiler-agent-running-unit-tests-to-1024x576.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/visual-studio-profiler-agent-running-unit-tests-to-768x432.webp 768w\" sizes=\"(max-width: 1111px) 100vw, 1111px\" \/><\/p>\n<h3>Other debugger features<\/h3>\n<ul>\n<li><strong>Smart Watch Suggestions:<\/strong> Copilot suggests context-aware expressions in Watch windows based on your debugging context<\/li>\n<li><strong>Output Window context:<\/strong> Copilot leverages runtime details from the Output Window for more accurate exception analysis<\/li>\n<li><strong>Exception analysis with repo context:<\/strong> Exception Analysis now uses GitHub or Azure DevOps repository context to deliver smarter, context-aware debugging insights<\/li>\n<\/ul>\n<h2>Better memory management with Segment Heap<\/h2>\n<p>Segment Heap is a modern heap implementation in Windows that delivers stronger protection against common memory vulnerabilities, higher allocation throughput, lower memory fragmentation, better scalability across cores, and more predictable performance under load. This feature is <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/segment-heap-support-for-c-projects-in-visual-studio\/\">now supported for C++ projects in Visual Studio<\/a> and is on by default for new C++ projects. Existing MSBuild projects can opt in under <strong>Project Properties &gt; Manifest Tool &gt; Input and Output<\/strong>.<\/p>\n<p><img decoding=\"async\" width=\"997\" height=\"681\" class=\"wp-image-36560\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/segment-heap-ai-generated-content-may-be-incorrec.webp\" alt=\"Image displaying MSBuild project properties interface with the Enable Segment Heap property set to Yes\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/segment-heap-ai-generated-content-may-be-incorrec.webp 997w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/segment-heap-ai-generated-content-may-be-incorrec-300x205.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/segment-heap-ai-generated-content-may-be-incorrec-768x525.webp 768w\" sizes=\"(max-width: 997px) 100vw, 997px\" \/><\/p>\n<p>For <a href=\"https:\/\/learn.microsoft.com\/cpp\/build\/cmake-presets-vs?view=msvc-180#enable-segment-heap\">CMake projects, see the documentation<\/a> for how to enable Segment Heap.<\/p>\n<p>If your application allocates and frees memory frequently (game engines, parsers, servers), Segment Heap can reduce fragmentation and improve throughput without code changes.<\/p>\n<h2>Attach your git commits as context for Copilot<\/h2>\n<p>Git users in Visual Studio can now attach a git commit as context to Copilot Chat from Git History, File History, or Annotate (Blame).<\/p>\n<p><img decoding=\"async\" width=\"1200\" height=\"674\" class=\"wp-image-36561\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/add-commit-to-copilot-chat.webp\" alt=\"Image displaying a git repository in a UI with branch history and a right-click menu option to Add a commit to Copilot Chat\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/add-commit-to-copilot-chat.webp 1200w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/add-commit-to-copilot-chat-300x169.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/add-commit-to-copilot-chat-1024x575.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2026\/05\/add-commit-to-copilot-chat-768x431.webp 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Multi-select is also supported. Ask Copilot to explain the change, spot issues, or write a similar change for another file.<\/p>\n<p>From the 18.0 release, you can also still specify commits in the chat with <em>#commitId<\/em>.<\/p>\n<h2>Try Out Visual Studio 2026<\/h2>\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">Download Visual Studio 2026<\/a> to get all of these features and more. If you are already on VS 2026, update to the latest version through <strong>Help &gt; Check for Updates<\/strong>.<\/p>\n<p>We want to hear from you. Report issues and share suggestions through <strong>Help &gt; Send Feedback<\/strong> in Visual Studio, visit <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Developer Community<\/a>, or leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2026 versions 18.1 through 18.6 deliver a wave of improvements for C++ developers. For MSVC Build Tools, the v14.51 release is now generally available with runtime performance gains and improved C++23 conformance. We also introduced Sample Profile Guided Optimization to help you improve the runtime performance of your C\/C++ programs. In the IDE, [&hellip;]<\/p>\n","protected":false},"author":1063,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3940,3963,3958],"tags":[],"class_list":["post-36545","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-copilot","category-msvc","category-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 2026 versions 18.1 through 18.6 deliver a wave of improvements for C++ developers. For MSVC Build Tools, the v14.51 release is now generally available with runtime performance gains and improved C++23 conformance. We also introduced Sample Profile Guided Optimization to help you improve the runtime performance of your C\/C++ programs. In the IDE, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/1063"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=36545"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36545\/revisions"}],"predecessor-version":[{"id":36566,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36545\/revisions\/36566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=36545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=36545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=36545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}