Visual Studio users who have been struggling with the IDE’s integration of the version control system Git can look forward to many improvements in the upcoming version 17.1.
Starting with the now-available second preview of the release, Visual Studio provides functionality to facilitate the comparison of branches. To get an idea about the differences between the currently checked out branch and a selected local or remote one, users need to right-click the targeted branch in the branch picker of the status bar. After choosing “Compare with current branch” from the context menu, they can select which files they’re interested in comparing, and a diff is displayed.
Another improvement when working with Git is the integration of the
--detach option into Visual Studio, so that the IDE now provides the option to pick a specific previous commit to check out for testing purposes or similar tasks. There’s also a preliminary version of line-staging — a new feature to allow users to interactively split changes into several commits, making it easier to follow PR etiquette and only create focussed (small) pull requests..
Other than that, VS users are offered options to create branches and use the branch picker for branching operations such as merge, rebase, and rename across all active repositories thanks to progress in the multi-repo support.
Developers working on embedded systems receive some additional help in the form of views for inspecting real time operating system objects and peripheral microcontroller registers. Visual Studio will also warn them if too many hardware breakpoints have been set to protect the debugger state from corruption.
Speaking of debugging, .NET programmers can now find an explorer window displaying stack traces under View>Other Windows. To get to the related code, they just have to click on the trace in question.
The preview also includes some enhancements to help users enforce consistent naming and code styles. Naming conventions, for instance, can be configured via the EditorConfig UI, while Analyze>Code Cleanup>Configure Code Cleanup allows developers to compile code fixers into custom cleanup profiles.
If the IDE is configured to run cleanups when a file is saved (under Tools>Options>Text Editor), Visual Studio will automatically run the latter and perform the chosen actions to bring the new code into shape. Programmers who decide to activate the newly added feature to automatically save files when the focus switches to a different application should be aware that those auto-saves won’t trigger cleanups.