From the course: AI-Powered Development: GitHub Copilot in Visual Studio

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Diagnosing incorrect runtime behavior

Diagnosing incorrect runtime behavior

- [Instructor] Silent bugs are the worst. The program runs, no unhandled exceptions are triggered, but the output is wrong. That usually means there's a logic problem hiding somewhere in our code. Of course, the development world has a time-honored solution for this, write unit tests, and yes, they help, but even with good test coverage, there are times when we need more insight. There are several ways to investigate our logic bugs with Copilot. In this demo, I'll show how we can use Copilot Chat while editing the code to diagnose and fix incorrect runtime behavior. Then in the next video, we'll explore the new debug explain feature, which becomes available when we are actively debugging. So my projects, I have two classes that are giving me trouble. One is here in this RuntimeBehavior class, it's BuggyMath. That's this method here, FutureValue. And the other problem is in this RayPoint class. This is a class that…

Contents