Visual Studio 2022 17.10 and GitHub Copilot: Your Coding Partner for Faster and Smarter Development

Mark Downie

Today, as we kick off the //BUILD 2024 conference, we’re thrilled to share the general availability of Visual Studio 2022 17.10! This release features a new, single GitHub Copilot extension, marking a significant leap forward in AI-assisted development by embedding the power of advanced AI directly into strategic parts of your Integrated Development Environment (IDE). 

With the integration of GitHub Copilot directly into Visual Studio, we’re offering you a coding partner with improved context, providing smart suggestions and code completions that help you stay focused and productive. While GitHub Copilot is implemented as an extension, it’s not acquired through the Visual Studio Marketplace or Extension Manager. Instead, it’s available directly from the Visual Studio installer as a recommended component—meaning it’s installed by default, though you can choose not to install it if preferred. We’ve updated the familiar features to use the latest AI models with the goal of keeping you in the creative flow for longer. To enable these AI experiences, activate your GitHub Copilot subscription today by signing in to GitHub and starting a free trial.

Today’s post will focus on GitHub Copilot, but over the next few weeks we will continue to provide additional details on the improvements in the 17.10 release, which includes the General Availability of .NET Aspire, further expanding Visual Studio’s capabilities into cloud-native application development. For a complete list of our latest enhancements check out the Release Notes. We invite you to try out Visual Studio 2022 17.10 GA and discover these new features and improvements for yourself.

Accelerating your coding experiences with GitHub Copilot

GitHub Copilot’s latest experience is integrated into Visual Studio and combines the features of GitHub Copilot’s code completion capabilities and GitHub Copilot Chat into one convenient package, eliminating the need to install two separate extensions.

Image Copilot Badge

This AI-driven inline companion understands your code, offering real-time suggestions and intelligent code completions. Additionally, GitHub Copilot chat presents the opportunity for a sustained, threaded conversation in which you build context and background for the problems you are investigating. It’s like having a coding partner that speeds up your development process, allowing you to focus on innovation rather than getting bogged down by the basics.

Onboarding developers to new teams and projects comes with the challenge of knowledge sharing, but when code commits are moving faster than documentation the most important source of truth becomes the code itself. GitHub Copilot Chat provides convenient slash commands and references to get better answers that are scoped to your specific solution and projects.

In the following example we ask GitHub Copilot to explain (/explain) a method from a specific class by including a reference to the class file using the # symbol:

/explain the AddItemToBasket method in #file:BasketService.cs 

Or in this example we ask it to fix a problem in a method:

/fix the HashThisData method in #file:StringExtentions.cs

Slash commands allow you to quickly set the intent for many common development tasks (e.g. /doc, /explain, /fix, /optimize, /generate, etc.). While references allow you to be more specific about the information you want GitHub Copilot to consider when answering your question (e.g. #solution, #locals, #file.cs, etc.).

Debugging faster

With GitHub Copilot debugging and validating code in Visual Studio becomes a less daunting task. For example, one of the most common bugs developers are forced to investigate comes from exceptions. Now when an error is caught the AI-powered Exception Helper can assist you through the troubleshooting process. The Exception Helper uses a combination of the exception type and call stacks to help form a context rich question from diagnostics data available to Visual Studio’s best in class debugger.

We are also supporting rubber ducking techniques where we invite you to articulate the problem in your natural written language while the debugger is paused. By including the local’s reference (#locals) you can ask direct questions about the state of a variable. For example, I might ask:

Why is the value of InterestRate NaN? #locals

Our newest set of debugging features include a deadlock detection helper that identifies blocking states in your running application, and more importantly, it can also suggest solutions for the underlying code. We have also integrated GitHub Copilot into our breakpoint workflows, allowing you to easily define your break point conditions, giving you the opportunity to strategically pause the debugger at key moments of an investigation.

Scaffold tests and summarize code commits

GitHub Copilot can also assist you in both the generation and resolution of unit tests, helping teams conserve code coverage and health. While scaffolding these kinds of tests is necessary work, it can also be a time consuming and repetitive task. In this example we create a set of tests for a selected class:

/tests #file:StringExtentions.cs

The outcome of GitHub Copilot assistance is a more productive development process, where time spent on crafting unit tests and error resolution is minimized, and code quality is consistently high.

We know that you can grow frustrated with the time you spend maintaining a healthy code base. It can be hard to recall and condense the hours of design and development into notes and documentation that communicate the appropriate intent to your team. GitHub Copilot enables smart PR and commit suggestions, it’s easier than ever to maintain clarity and consistency across your developer projects.

We found that 80% of developers find the generated PR description suggestion helpful enough to use. In all, GitHub Copilot helps developers complete their code faster, reduce their mental effort, while allowing them to focus on more enjoyable work.

As we wrap up our exploration of Visual Studio’s latest enhancements with GitHub Copilot, it’s clear that this integration creates an important opportunity to help you achieve more. Whether you’re a seasoned developer or just starting out, the latest updates to Visual Studio are designed to help you be more productive. We invite you to download the latest version of Visual Studio, activate your GitHub Copilot subscription today and start a free trial to enjoy the latest AI experiences.

Share your feedback and stay connected with Visual Studio!

We appreciate the time you’ve spent reporting issues and submitting suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thanks for reading and Happy Coding!


Feedback usabilla icon