{"id":36161,"date":"2025-12-16T18:25:48","date_gmt":"2025-12-16T18:25:48","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=36161"},"modified":"2025-12-16T18:52:11","modified_gmt":"2025-12-16T18:52:11","slug":"c-code-editing-tools-for-github-copilot-now-in-public-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/c-code-editing-tools-for-github-copilot-now-in-public-preview\/","title":{"rendered":"C++ code editing tools for GitHub Copilot: now in Public Preview"},"content":{"rendered":"<p>In November, we <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/perform-wide-sweeping-refactors-using-c-code-editing-tools-for-github-copilot\/\">introduced C++ code editing tools for GitHub Copilot as a Private Preview,<\/a> focusing on partnering with customers to tackle one of the common, taxing challenges for C++ development: refactoring at scale. Since then, we&#8217;ve listened to feedback and refined our tooling to make wide-sweeping C++ edits easier.<\/p>\n<blockquote><p><em>&#8220;With C++ code editing tools for GitHub Copilot in Visual Studio, we&#8217;ve seen noticeably better overall results, with fewer errors and faster processing on large projects.&#8221; &#8211; Software engineer (from our Private Preview)<\/em><\/p><\/blockquote>\n<p>We&#8217;re excited to announce that C++ code editing tools for GitHub Copilot are now available to all C++ users in <a href=\"https:\/\/visualstudio.microsoft.com\/insiders\/\">the latest version of Visual Studio 2026 Insiders<\/a>.<\/p>\n<h3>C++ code editing tools for GitHub Copilot<\/h3>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>The C++ code editing tools provide rich context for any symbol in your project, allowing <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/copilot-agent-mode?view=vs-2022\">Copilot agent mode<\/a> to:<\/p>\n<ul>\n<li>View all references across your codebase<\/li>\n<li>Understand metadata such as type, declaration, and scope<\/li>\n<li>Visualize class inheritance hierarchies<\/li>\n<li>Trace function call chains<\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-list.webp\"><img decoding=\"async\" class=\"size-full wp-image-36163 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-list.webp\" alt=\"a list of all the C++ tools available to agent mode to call upon (get_symbol_call_hierarchy, get_symbol_class_hierarchy, get_symbol_info, and get_symbol_references)\" width=\"532\" height=\"213\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-list.webp 532w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-list-300x120.webp 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/a><\/p>\n<p>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.<\/p>\n<h3>Getting started<\/h3>\n<p>To get started with these tools<\/p>\n<ol>\n<li>Open your C++ project and ensure you have IntelliSense enabled<\/li>\n<li>Navigate to <strong>Tools<\/strong> &gt; <strong>Options<\/strong> and turn on the visibility of the tools via <strong>GitHub<\/strong> &gt; <strong>Copilot<\/strong> settings. You may need to close and re-open your solution for the tools to populate after this step.\n<a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting.webp\"><img decoding=\"async\" class=\"size-full wp-image-36165 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting.webp\" alt=\"A setting selected to enable C++ tools to be used by Copilot in the Visual Studio setting\" width=\"1071\" height=\"576\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting.webp 1071w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting-300x161.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting-1024x551.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-setting-768x413.webp 768w\" sizes=\"(max-width: 1071px) 100vw, 1071px\" \/><\/a><\/li>\n<li>Enable any or all tools via the &#8220;Tools&#8221; icon in Copilot Chat<\/li>\n<li style=\"list-style-type: none;\">\n<ol>\n<li style=\"list-style-type: none;\"><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-enable.webp\"><img decoding=\"async\" class=\"size-full wp-image-36166 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-enable.webp\" alt=\"The option in the Tools icon in Copilot Chat to enable each C++ tools\" width=\"584\" height=\"681\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-enable.webp 584w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/cpp-tools-enable-257x300.webp 257w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p><em>Note: Tool names and UI may evolve during the Public Preview and are subject to change.<\/em><\/p>\n<h3>Example scenarios<\/h3>\n<p>All examples below were showcased using <a href=\"https:\/\/github.com\/bulletphysics\/bullet3\/\">bullet3<\/a>, an open-source C++ physics simulation engine.<\/p>\n<h4><strong>1. Add additional functionality to existing functions<\/strong><\/h4>\n<p>As applications evolve, you often need to enhance existing functions without breaking current behavior. This can include adding logging or performance metrics.<\/p>\n<p>These tools help the agent quickly identify all relevant references, ensuring complete and accurate updates for feature additions.<\/p>\n<h4><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/add-additional-functionality.webp\"><img decoding=\"async\" class=\"size-full wp-image-36167 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/add-additional-functionality.webp\" alt=\"A prompt asking Copilot Chat to update each reference of a function to use a new enum parameter called Logging Level, which uses get_symbol_references, and get_symbol_info tools to complete the operation.\" width=\"681\" height=\"606\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/add-additional-functionality.webp 681w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/add-additional-functionality-300x267.webp 300w\" sizes=\"(max-width: 681px) 100vw, 681px\" \/><\/a><\/h4>\n<h4>2. Improve memory management<\/h4>\n<p>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.<\/p>\n<h4><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management.webp\"><img decoding=\"async\" class=\"size-full wp-image-36169 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management.webp\" alt=\"A prompt asking copilot to update from vector to shared point of vector which then calls upon get_symbol_references to understand symbol scope.\" width=\"1073\" height=\"742\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management.webp 1073w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management-300x207.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management-1024x708.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/memory-management-768x531.webp 768w\" sizes=\"(max-width: 1073px) 100vw, 1073px\" \/><\/a><strong>3. Visualizing unfamiliar code<\/strong><\/h4>\n<p>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.<\/p>\n<p>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.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code.webp\"><img decoding=\"async\" class=\"size-full wp-image-36170 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code.webp\" alt=\"A prompt asking Copilot chat to visualize call chains in a file, which it invokes several C++ tools to do so\" width=\"1076\" height=\"1011\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code.webp 1076w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code-300x282.webp 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code-1024x962.webp 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code-768x722.webp 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/visualize-code-24x24.webp 24w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/a>Best practices<\/h3>\n<ol>\n<li><strong>Choose the right model for the job<\/strong>: Models that are optimized for tool-calling will perform best with our tools. To learn more about the models available, please visit these docs: <a href=\"https:\/\/docs.github.com\/en\/copilot\/reference\/ai-models\/model-comparison\">AI model comparison &#8211; GitHub Docs<\/a><\/li>\n<li><strong>Be specific with prompts<\/strong>: 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.<\/li>\n<\/ol>\n<h3>Share your feedback<\/h3>\n<p>We\u2019d 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.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/vs-feedback-icon.webp\"><img decoding=\"async\" class=\"size-full wp-image-36171 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/vs-feedback-icon.webp\" alt=\"The icon to submit feedback through Visual Studio\" width=\"335\" height=\"245\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/vs-feedback-icon.webp 335w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2025\/12\/vs-feedback-icon-300x219.webp 300w\" sizes=\"(max-width: 335px) 100vw, 335px\" \/><\/a><\/h3>\n<h3>What&#8217;s next<\/h3>\n<p>We&#8217;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!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;ve listened to feedback and refined our tooling to make wide-sweeping C++ edits easier. &#8220;With C++ code editing tools [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":36163,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3949,230,3958],"tags":[],"class_list":["post-36161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-copilot-2","category-new-feature","category-visual-studio"],"acf":[],"blog_post_summary":"<p>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&#8217;ve listened to feedback and refined our tooling to make wide-sweeping C++ edits easier. &#8220;With C++ code editing tools [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36161","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\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=36161"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/36161\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/36163"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=36161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=36161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=36161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}