September 25th, 2024

Organize Your Breakpoints like a pro

Harshada Hole
Product Manager

Do you feel overwhelmed by the sheer number of breakpoints in your Visual Studio project? Wish you could categorize and toggle them on and off with ease? The new breakpoint group feature in Visual Studio 2022 is here to transform your debugging experience.

Image of a large list of breakpoints

Breakpoint groups allow you to create custom collections of breakpoints and apply various actions to them. For example, you can enable or disable all breakpoints in a group or set conditions and actions for them or even make the whole group dependent on other breakpoints.

But that’s not all. You can also mark the selected breakpoint group as the default, ensuring all newly added breakpoints are automatically included in that group. This enhancement simplifies the management and organization of breakpoints, providing seamless debugging when investigating multiple issues.

Recap: Breakpoint groups

To create a breakpoint group, right-click on any breakpoint in the Breakpoints window and select Add to Group > New Group. You can name the group and add a description if you want.

Image bpgroup

To add more breakpoints to the group, simply drag and drop them from the Breakpoints window or use the right-click menu. To remove breakpoints from the group, drag and drop them outside the group or use the right-click menu. You can also delete the group, which will remove all the breakpoints in the group from your project.

Default Breakpoint Group

To set a breakpoint group as the default, simply right-click on the group and choose “Set as Default Group.” The default group will be distinctly labeled in bold, making it easy to identify. When you have a default breakpoint group, any new breakpoints you add to your code will automatically be added to that group. This ensures that your breakpoints are organized consistently, without the need to manually sort them each time you add new ones.

If your needs change, you can easily move breakpoints to a different group at any time. This flexibility allows you to adapt your breakpoint organization as your project evolves. You can change the default group at any time or clear it altogether.

Image deafultbp

You can access all the breakpoint group actions from the right-click menu or the toolbar in the Breakpoints window.

Try it out today

We hope you find the breakpoint group feature useful and productive. It’s one of the many improvements we’ve made to the debugging experience in Visual Studio 2022, thanks to your feedback and suggestions.

Please download the latest version of Visual Studio and try it out. Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

Report any issues or suggestions via Help > Send Feedback.

Learn more about other Copilot assisted features in Visual Studio by checking out additional resources Debug with GitHub Copilot – Visual Studio (Windows) | Microsoft Learn

Thank you for using Visual Studio and happy coding!

Author

Harshada Hole
Product Manager

Harshada Hole is a Product Manager on the Visual Studio Debugging and Profiling Team, dedicated to enhancing the diagnostics experience by making it more productive and efficient for developers.