{"id":257105,"date":"2026-08-26T09:00:47","date_gmt":"2026-08-26T16:00:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=257105"},"modified":"2026-08-25T10:12:49","modified_gmt":"2026-08-25T17:12:49","slug":"the-visual-studio-debugger-agentic-workflow-gets-a-test-driven-upgrade","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/the-visual-studio-debugger-agentic-workflow-gets-a-test-driven-upgrade\/","title":{"rendered":"The Visual Studio Debugger Agentic Workflow Gets a Test-Driven Upgrade"},"content":{"rendered":"<p><span data-contrast=\"auto\">A few months ago, we introduced a new guided agentic workflow in the Visual Studio Debugger Agent designed to help you move from a bug report to a verified fix without spending your morning guessing where to begin.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">If you missed that announcement, check out\u00a0 <\/span><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/stop-hunting-bugs-meet-the-new-visual-studio-debugger-agent\/\"><span data-contrast=\"none\">Stop Hunting Bugs: Meet the New Visual Studio Debugger Agent<\/span><\/a><span data-contrast=\"auto\"> to see how the Agent builds a hypothesis, guides the debugger, investigates your application at runtime, and validates the final change.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Today, we\u2019re building on that experience with a new <\/span><b><span data-contrast=\"auto\">Test-Driven Investigation<\/span><\/b><span data-contrast=\"auto\"> workflow. The Debugger Agent can now create or identify a focused test, debug through it to investigate the root cause, and rerun it to validate the fix. It\u2019s especially useful for the bug reports we all know too well: an exception, a stack trace, or a note that something \u201csometimes fails,\u201d with no dependable way to reproduce it manually.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/oDh86dsy57s\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p aria-level=\"2\"><span style=\"font-size: 14pt;\"><b>Building on the Guided Debugger Loop<\/b>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Live debugging remains a great fit when a problem can be reproduced reliably. When it can\u2019t, Test-Driven Investigation gives the Debugger Agent another way in:\u00a0 capture the failure in an automated test and make it repeatable.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Start with a GitHub issue, Azure DevOps work item, or a simple issue description. (See <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/debugger\/debug-with-copilot-prompts?view=visualstudio#bug-reproduction-and-diagnosis\"><span data-contrast=\"none\">example prompts )<\/span><\/a><span data-contrast=\"auto\"> The Agent reviews the available context, asks for missing details, and recommends the best investigation path.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span style=\"font-size: 14pt;\"><b>Choosing the Right Path for the Problem<\/b>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">When reliable reproduction steps are available, the Debugger Agent can help you choose the approach that best fits the scenario:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"10\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Live Debugging: <\/span><\/b><span data-contrast=\"auto\">Launch the application, reproduce the issue interactively, and inspect the live runtime state.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"10\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Test-Driven Investigation: <\/span><\/b><span data-contrast=\"auto\">Create or identify a test that reproduces the behavior, then use that test to drive the investigation and validate the fix. (Existing Test infrastructure is needed)<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">If the issue doesn\u2019t include usable reproduction steps, the Agent first looks for a practical way to derive them from the description, diagnostics, and code context. If it can\u2019t establish a dependable manual repro and finds supported test infrastructure, it automatically starts the Test-Driven Investigation workflow and generates or identifies a focused test.\u00a0<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span style=\"font-size: 14pt;\"><b>A Failing Test Becomes the Investigation<\/b>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Once a test captures the problem, the Debugger Agent doesn\u2019t simply generate code and hope for the best. It debugs through the test, using breakpoints and runtime information to understand why the behavior occurs.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">The workflow can help you:<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<ul>\n<li><b><span data-contrast=\"auto\">Reproduce the issue consistently. <\/span><\/b><span data-contrast=\"auto\">The same failing test can be run throughout the investigation.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Inspect what the code is actually doing. <\/span><\/b><span data-contrast=\"auto\">The Agent evaluates variables, call stacks, and runtime state while the test executes.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Test the hypothesis. <\/span><\/b><span data-contrast=\"auto\">Potential causes can be confirmed or ruled out using evidence from the debugging session.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Validate the resolution. <\/span><\/b><span data-contrast=\"auto\">After you approve the proposed change, the Agent reruns the test to confirm that it passes.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Check for regressions. <\/span><\/b><span data-contrast=\"auto\">When appropriate, related tests can also be run to make sure the fix hasn\u2019t disrupted existing behavior.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">This creates a useful debugging loop: reproduce, investigate, fix, and verify. Instead of relying on a one-time manual check, you finish with an automated test that documents the expected behavior and can continue protecting it in the future.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span style=\"font-size: 14pt;\"><b>You\u2019re Still Driving<\/b>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">You stay in control throughout the workflow. Review or modify the test, steer the investigation, and approve the fix helping ensure the test reflects the real customer problem.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p aria-level=\"2\"><span style=\"font-size: 14pt;\"><b>Try It and Let Us Know What You Think!<\/b>\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Try Test-Driven Investigation with your next hard-to-reproduce bug. We\u2019d love to hear how it fits into your debugging workflow and what you\u2019d like to see next.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Stay connected with the Visual Studio team by following <\/span><a href=\"https:\/\/twitter.com\/VS_Debugger\"><span data-contrast=\"none\">@VS_Debugger<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/twitter.com\/VisualStudio\"><span data-contrast=\"none\">@VisualStudio<\/span><\/a><span data-contrast=\"auto\">, <\/span><a href=\"https:\/\/www.youtube.com\/@visualstudio\"><span data-contrast=\"none\">YouTube<\/span><\/a><span data-contrast=\"auto\">, and <\/span><a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-visual-studio\/\"><span data-contrast=\"none\">LinkedIn<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:180,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few months ago, we introduced a new guided agentic workflow in the Visual Studio Debugger Agent designed to help you move from a bug report to a verified fix without spending your morning guessing where to begin.\u00a0\u00a0 If you missed that announcement, check out\u00a0 Stop Hunting Bugs: Meet the New Visual Studio Debugger Agent [&hellip;]<\/p>\n","protected":false},"author":26573,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6883,9,7019],"class_list":["post-257105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-copilot","tag-debug","tag-visual-studio-2026"],"acf":[],"blog_post_summary":"<p>A few months ago, we introduced a new guided agentic workflow in the Visual Studio Debugger Agent designed to help you move from a bug report to a verified fix without spending your morning guessing where to begin.\u00a0\u00a0 If you missed that announcement, check out\u00a0 Stop Hunting Bugs: Meet the New Visual Studio Debugger Agent [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/257105","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=257105"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/257105\/revisions"}],"predecessor-version":[{"id":257113,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/257105\/revisions\/257113"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=257105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=257105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=257105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}