Visual Studio Closeup: Better Search, Python, C++, Game Development, More

Even though Python is becoming increasingly tied to the popular Visual Studio Code editor, Microsoft has been busy infusing its flagship Visual Studio IDE with better Python functionality and a host of other improvements touching upon search, C++ and more.

VS Code's affinity for Python development is reflected by the Python extension being downloaded almost 59 million times from the Marketplace, but Python coders aren't being forgotten by the Visual Studio IDE dev team.

Microsoft has been busy highlighting new Visual Studio functionality in the wake of this week's release of Visual Studio 2019 16.3 Preview 2, starting off with Python testing. Here's a look at recent updates:

What's New for Python
"We are happy to announce that the popular Python testing framework pytest is now supported," said Microsoft this week in a post about what's new for Python in VS 2019 16.3 Preview 2. "Additionally, we have re-worked the unittest experience for Python users in this release."

Python Test Detail Summary Window
[Click on image for larger view.] Python Test Detail Summary Window (source: Microsoft).

Specifically, the post details enhancements affecting:

  • Enabling and configuring testing for projects: "Configuring and working with Python tests in Visual Studio is easier than ever before." Details are provided for working with unittest and pytest.
  • Configuring tests for open folder scenarios: "In this release of Visual Studio 2019, users can configure tests to work in our popular open folder scenario. To configure and enable tests, navigate to the Solution explorer, click the "Show All Files" icon to show all files in the current folder and select the PythonSettings.json file within the 'Local Settings' folder."
  • Debugging tests: "In this latest release, we've updated test debugging to use our new ptvsd 4 debugger, which is faster and more reliable than ptvsd 3. We've added an option so that you can use the legacy debugger if you run into issues."

Code, Recent Items and Template Search in Visual Studio
The new Visual Studio search experience allows for looking for code, recent items and templates.

"These features can all be accessed by one single shortcut (Ctrl+Q) and are currently available in our Preview build (," Microsoft said. "They will be available in Visual Studio 2019, version 16.3, targeted for the end of September."

Here are summaries of each feature:

  • Code Search: "Code search has arrived in the search (Ctrl+Q) control. It is now possible to search for types and members with C# and VB, as well as file search for all languages. Results will show up as you type your search query, as well as in a dedicated 'Code' group accessible via keyboard shortcut or mouse click. Keep an eye out for support of additional languages in the near future!"
  • Recent Items Search: "Recently opened items can be searched through search (Ctrl+Q) and in the start window (Alt+F, W). Both entry points will be enabled with fuzzy search (to help automatically rectify typos) and the ability to see highlighted matches to your search query in the results."
  • Template Search: "Your favorite templates can now be accessed faster when you are starting up Visual Studio, or already in the IDE! Templates can be accessed through search (Ctrl+Q) and in the "New Project Dialog" (Ctrl+Shift+N). Both entry points will also be enabled with fuzzy search (to help automatically rectify typos), highlighted matches to your search query in the results, and improved ranking to ensure increased accuracy."

Game Performance Improvements
This post follows up on previously listed C++ game development improvements in VS 2019.

The post details improvements in throughput (see more here) and new optimizations including:

  • Vectorizing tiny perfect reduction loops on AVX
  • Recognition of intrinsics working on a single vector element
  • More FMA patterns
  • Memset and initialization
  • Inlining

The optimizations resulted in 2 percent to 3 percent performance gains for the most CPU-intensive parts of the Infiltrator Demo game.

New C++ Core Check Rules
Visual Studio 2019 v16.3 Preview 2 received three new rules for the C++ Core Guidelines Checker: const, enum and type.

"The 'Enum Rules' set has been added in this release," Microsoft said. "It can be enabled by selecting 'C++ Core Check Enum Rules' in the Project Settings dialog. This rule set can be used to detect common errors when using enums as specified in the Core Guidelines Enum section."

Productivity Improvements for C++
Yet another C++ related post provides details on:

  • New Default Semantic Colorization: "In Visual Studio 2019 version 16.3 Preview 2 we've introduced a new default semantic colorization scheme for C++. For a long time, many of the default colors were simply black. However, colorization can help you quickly understand the structure of code at a glance."
    Enhanced Color Scheme for the Light and Dark Schemes
    [Click on image for larger view.] Enhanced Color Scheme for the Light and Dark Schemes (source: Microsoft).
  • Template Argument Filtering in Call Stack Window: "Previously, when using heavily to moderately templated types (including the STL), the Call Stack window quickly would become overwhelmed with template expansions to the point that became difficult to debug due to poor readability. Now, you can right-click in the Call Stack Window and toggle "Show Template Arguments" to make room for other important information, and making it much more readable!"
  • IntelliCode On-By-Default: "In Visual Studio 2019 version 16.2 we added C++ IntelliCode in-box. In version 16.3 Preview 2, we are taking that a step further and have turned the feature on-by-default. This means that, by default, you'll start to benefit from autocompletion results recommended by a machine-learned prediction model. The recommended results are surfaced at the top of the completion list and are prepended with stars."

Vcpkg: 2019.07 Update
The C/C++ theme continues in this post, which details caching in Azure Pipelines with vcpkg, a tool that helps developers manage C and C++ libraries on Windows, Linux and macOS.

Pipeline Caching
[Click on image for larger view.] Pipeline Caching (source: Microsoft).

"The public preview of caching in Azure Pipelines is now available, and you can use it with vcpkg!" Microsoft said. "You can use pipeline caching to improve build time by allowing previously built and cached vcpkg artifacts (including libraries) to be reused in subsequent runs. This allows you to reduce and avoid the cost to rebuild the same libraries for each build run the same libraries."

These posts and many others about Visual Studio 2019 v16.3 are available on the Visual Studio blog site.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube