{"id":254306,"date":"2025-09-11T09:05:09","date_gmt":"2025-09-11T16:05:09","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=254306"},"modified":"2025-09-12T12:28:26","modified_gmt":"2025-09-12T19:28:26","slug":"copilot-profiler-agent-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/copilot-profiler-agent-visual-studio\/","title":{"rendered":"Democratizing Performance: The Copilot Profiler Agent in Action on Real Code"},"content":{"rendered":"<p style=\"text-align: left;\"><span data-contrast=\"auto\"><div class=\"alert alert-success\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Lightbulb\"><\/i><strong>Watch behind the scenes of the Profiler Agent<\/strong><\/p>Head on over to the <a href=\"https:\/\/www.youtube.com\/watch?v=u8kPpwvI1AI&amp;t=2s\" target=\"_blank\" rel=\"noopener\">Copilot Profiler Agent<\/a>\u00a0to watch.<\/div><\/span><\/p>\n<p style=\"text-align: left;\"><span data-contrast=\"auto\"><br \/>We\u2019re excited to announce the <\/span><b><span data-contrast=\"auto\">Copilot Profiler Agent <\/span><\/b><span data-contrast=\"auto\">available in Visual Studio 2026 <\/span><span data-contrast=\"none\">Insiders,<\/span> <span data-contrast=\"none\">it&#8217;s an<\/span><span data-contrast=\"auto\"> AI-powered performance assistant built directly into Visual Studio. Forget staring at endless call trees or walls of mysterious numbers that leave you asking, <\/span><i><span data-contrast=\"auto\">\u201cwhere do I even start?\u201d<\/span><\/i><span data-contrast=\"auto\"> The Copilot Profiler Agent changes that.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Instead of raw data, you now get an AI partner that not only points out the real bottlenecks but also explains what\u2019s going on, suggests fixes, writes benchmarks, and even validates improvements all in a smooth, guided loop.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It\u2019s like having a performance engineer sitting next to you. Without the coffee runs. And starting today, it\u2019s ready for action in the latest version of Visual Studio, powered by GitHub Copilot.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\"> Download <a href=\"https:\/\/visualstudio.microsoft.com\/insiders\/\">Visual Studio 2026 Insiders <\/a>today.<\/span><\/p>\n<p style=\"text-align: center;\"><span data-contrast=\"auto\"><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/09\/dssss.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-254311\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/09\/dssss.png\" alt=\"dssss image\" width=\"572\" height=\"285\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/09\/dssss.png 572w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2025\/09\/dssss-300x149.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/a><\/span><\/p>\n<p style=\"text-align: center;\">Copilot Profiler Agent\u00a0<\/p>\n<h3><b><span data-contrast=\"none\">Meet the Copilot Profiler Agent<\/span><\/b><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:281,&quot;335559739&quot;:281}\">\u00a0<\/span><\/h3>\n<p data-start=\"262\" data-end=\"512\">The Profiler Agent is the first-of-its-kind AI assistant in Visual Studio, designed to work seamlessly with GitHub Copilot.\u00a0<\/p>\n<p data-start=\"514\" data-end=\"546\">Here\u2019s what it can do for you:<\/p>\n<ul data-start=\"548\" data-end=\"905\">\n<li data-start=\"548\" data-end=\"615\">\n<p data-start=\"550\" data-end=\"615\"><strong data-start=\"550\" data-end=\"561\">Analyze<\/strong> CPU usage, memory allocations, and runtime behavior<\/p>\n<\/li>\n<li data-start=\"616\" data-end=\"675\">\n<p data-start=\"618\" data-end=\"675\"><strong data-start=\"618\" data-end=\"629\">Surface<\/strong> the most expensive bottlenecks in your code<\/p>\n<\/li>\n<li data-start=\"676\" data-end=\"751\">\n<p data-start=\"678\" data-end=\"751\"><strong data-start=\"678\" data-end=\"690\">Generate<\/strong> new BenchmarkDotNet benchmarks (or optimize existing ones)<\/p>\n<\/li>\n<li data-start=\"752\" data-end=\"827\">\n<p data-start=\"754\" data-end=\"827\"><strong data-start=\"754\" data-end=\"765\">Suggest<\/strong> actionable performance improvements you can apply instantly<\/p>\n<\/li>\n<li data-start=\"828\" data-end=\"905\">\n<p data-start=\"830\" data-end=\"905\"><strong data-start=\"830\" data-end=\"842\">Validate<\/strong> fixes with before\/after metrics, all in a smooth guided loop<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"907\" data-end=\"986\">And the best part, it\u2019s as easy as asking a question in Copilot Chat. You can:<\/p>\n<ul data-start=\"988\" data-end=\"1108\">\n<li data-start=\"988\" data-end=\"1040\">\n<p data-start=\"990\" data-end=\"1040\">Tag it directly: <code data-start=\"1007\" data-end=\"1038\">@profiler Why is my app slow?<\/code><\/p>\n<\/li>\n<li data-start=\"1041\" data-end=\"1108\">\n<p data-start=\"1043\" data-end=\"1108\">Or just ask in plain language in Copilot agent mode: \u201cWhy is my frame rate dropping?\u201d<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"1110\" data-end=\"1189\">(Just make sure the Profiler Agent is enabled in the Copilot Chat tool menu.)<\/p>\n<p data-start=\"1110\" data-end=\"1189\"><span data-contrast=\"auto\">Now, let\u2019s take a look at it in action. In the demo below, you will see I pointed the agent at an existing benchmark in <\/span>SharpZipLib<span data-contrast=\"auto\"> and asked it to optimize. From there, it handled everything: running the benchmark, guiding me through the changes, applying targeted performance fixes, and validating the results by re-running the benchmark. The result was a measurable performance improvement, all from a <\/span><b><span data-contrast=\"auto\">single prompt<\/span><\/b><span data-contrast=\"auto\">.<\/span><\/p>\n<p><iframe title=\"Copilot Profiler Agent : Profiling Made Simple\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/TPAMiz6E2XU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h3><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:240,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">R<\/span><b><span data-contrast=\"none\">eal Code. Real Impact<\/span><\/b><\/h3>\n<p><span data-contrast=\"auto\">When we set out to build the Copilot Profiler Agent, we knew one thing for sure: showing it off on a \u201chello world\u201d app wasn\u2019t going to prove anything. Real developers don\u2019t struggle with toy code. The real test was whether it could handle messy, performance-critical, <\/span>production-grade projects.\u00a0<\/p>\n<p><span data-contrast=\"auto\">So we aimed high: pointing the Profiler Agent at the <\/span><b><span data-contrast=\"auto\">top 100 most widely used open-source libraries and applications <\/span><\/b><span data-contrast=\"auto\">the kind of code that powers frameworks, services, and apps you probably use every single day.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The results blew past our expectations. The Profiler Agent :<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0fc\" data-font=\"Wingdings\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Wingdings&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0fc&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">\u00a0Surfaced hidden bottlenecks you wouldn\u2019t spot on your own<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0fc\" data-font=\"Wingdings\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Wingdings&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0fc&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Suggested practical, actionable fixes<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0fc\" data-font=\"Wingdings\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Wingdings&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0fc&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">\u00a0Auto-generated benchmarks to validate improvements<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0fc\" data-font=\"Wingdings\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Wingdings&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0fc&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><span data-contrast=\"auto\">\u00a0Turned insights into real pull requests on real projects<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">We\u2019ve already contributed PRs to <\/span><b><span data-contrast=\"auto\">CSVHelper, NLog, Serilog, and more <\/span><\/b><span data-contrast=\"auto\">all powered by the Profiler Agent\u2019s insights.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">And the feedback from the community says it all:<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote>\n<p><i><span data-contrast=\"auto\">Saw the YouTube video and it is almost magical. Amazing how it was able to recognize that multiple expression-compiles could be merged into a single expression-compile.<\/span><\/i><span data-contrast=\"auto\">\u2013 NLog Maintainer<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<\/blockquote>\n<p><span data-contrast=\"auto\">We\u2019ll be publishing a detailed case studies soon, walking through exactly how the Profiler Agent tackled these projects step by step.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This isn\u2019t just OSS, either. We rolled out the Profiler Agent for internal dogfooding across Microsoft teams, and the results have been equally eye-opening.<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Here\u2019s one story from a Principal Engineer:<\/span><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote>\n<p><i><span data-contrast=\"auto\">I had a class that wrapped a dictionary and exposed a limited set of operations. I wanted to support foreach on the class, so I added IEnumerable&lt;TKey, TValue&gt;, but this caused a big jump in memory use and execution time compared to iterating directly over the inner dictionary. After several prompt iterations with the profiler agent, it nudged me toward the realization that .NET supports duck typing for foreach. I didn\u2019t need IEnumerable at all just exposing GetEnumerator that forwards to the inner dictionary worked.\u00a0<\/span><\/i><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<p><i><span data-contrast=\"auto\">Honestly, I\u2019m not sure I would have figured this out on my own. I even asked several principal-level engineers with deep .NET experience, and none of them knew about this either. When focused on allocation optimization, the profiler agent does a great job of spotting improvements.<\/span><\/i><span data-ccp-props=\"{&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/p>\n<\/blockquote>\n<h3><b><span data-contrast=\"none\">What\u2019s Next<\/span><\/b><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:240,&quot;335559739&quot;:240}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">This is just the beginning. The Profiler Agent currently supports high CPU usage analysis and .NET object allocations and memory usage analysis and more coming soon.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We\u2019re excited to see how you use this in your own workflows whether it\u2019s tuning a game engine, optimizing a service, or just speeding up a slow UI. So please try it out and don&#8217;t forget to Share your results by taking this <\/span><span data-contrast=\"auto\"><a href=\"https:\/\/www.surveymonkey.com\/r\/2ZNJFYP?sessionId=[sessionId_value]\">short survey<\/a>.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p>Stay connected with the Visual Studio team by following us on <a href=\"https:\/\/twitter.com\/VS_Debugger\">Twitter @VS_Debugger<\/a>, <a href=\"https:\/\/twitter.com\/VisualStudio\">Twitter @VisualStudio<\/a>, YouTube, and <a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-visual-studio\/\">LinkedIn.<\/a><\/p>\n<p><b><span data-contrast=\"auto\">Democratizing profiling, one performance wins at a time. <\/span><\/b><span data-contrast=\"auto\">\ud83d\ude0a\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re excited to announce the Copilot Profiler Agent available in Visual Studio 2026 Insiders, it&#8217;s an AI-powered performance assistant built directly into Visual Studio. Forget staring at endless call trees or walls of mysterious numbers that leave you asking, \u201cwhere do I even start?\u201d The Copilot Profiler Agent changes that.\u00a0\u00a0 Instead of raw data, you [&hellip;]<\/p>\n","protected":false},"author":26573,"featured_media":254311,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[9,6821,6743,7019],"class_list":["post-254306","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-debug","tag-performance-improvements","tag-profiling","tag-visual-studio-2026"],"acf":[],"blog_post_summary":"<p>We\u2019re excited to announce the Copilot Profiler Agent available in Visual Studio 2026 Insiders, it&#8217;s an AI-powered performance assistant built directly into Visual Studio. Forget staring at endless call trees or walls of mysterious numbers that leave you asking, \u201cwhere do I even start?\u201d The Copilot Profiler Agent changes that.\u00a0\u00a0 Instead of raw data, you [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/254306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/26573"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=254306"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/254306\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/254311"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=254306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=254306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=254306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}