November 28th, 2024

Transform your debugging experience with GitHub Copilot

Wendy Breiding (SHE/HER)
Senior Manager, Product Management

Are your unit tests failing, and do you want to debug them more effectively? The latest feature in Visual Studio 2022, powered by GitHub Copilot, has the perfect solution for you. Introducing the Debug with Copilot button in Test Explorer, this feature takes the hassle out of debugging failed tests and gets you closer to passing tests in no time.

Screen shot of Visual Studio with the Ask Copilot buttons highlighted on the Test Explorer.

Debugging failing unit tests can often be a tedious and frustrating process. Developers spend significant time identifying the root cause of the failure and figuring out the steps to resolve it. This time-consuming process can delay development timelines and reduce productivity. But fear not, Visual Studio 2022 with GitHub Copilot has an innovative solution to streamline this process.

Introducing Debug with Copilot in Test Explorer

With Debug with Copilot in Test Explorer, your debugging experience is about to become more efficient and user-friendly. When you click on this button, GitHub Copilot steps in to assist you with a comprehensive debug plan. This plan includes setting appropriate breakpoints, watching variables, and launching the debug session.

How it works

Once you initiate the feature, GitHub Copilot provides a detailed debug plan tailored to your specific test. It sets the necessary breakpoints and watches variables that are crucial for determining the next steps. As the debug session progresses and hits a breakpoint, GitHub Copilot analyzes the values of the watched variables and provides guidance on whether to continue debugging or proceed with fixing the problematic code.

Screen shot of GitHub Copilot chat after initiating Debug with Copilot from Test Explorer.

You can engage in a continuous conversation with GitHub Copilot until your test passes, making the entire process more interactive and less time-consuming. This feature not only saves time but also enhances your debugging skills by providing insightful suggestions and guidance.

Screenshot of GitHub Copilot chat after variables returned from debug session showing it knows how to fix the failure.

Appreciation for our users

We are immensely grateful for the continuous feedback from our users, which drives us to make Visual Studio better with each update. Your insights and suggestions are invaluable in helping us deliver features that truly make a difference in your development workflow.

Thank you for being a part of this journey with us. We are excited to see how the Debug with Copilot feature transforms your debugging experience and contributes to your success.

Author

Wendy Breiding (SHE/HER)
Senior Manager, Product Management