Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 5971

Enhanced in Visual Studio 2019: Search for Objects and Properties in the Watch, Autos, and Locals Windows

$
0
0

Are you inspecting many variables at once in the Locals window? Tired of constantly scrolling through the Watch window to locate the object you are currently interested in? New to Visual Studio 2019 for most languages (with some exclusions such as Xamarin, Unity, and SQL), you can now find your variables and their properties faster using the new search feature found in the Watch, Autos, and Locals windows!

With the new search feature, you will be able to highlight and navigate to specified values contained within the name, value, and type columns of each watch window.

Find your keywords faster using search and highlighting

If you are a fan of scrolling to the items you want, highlighting will allow you to find what you want easier. As you start typing in the search bar, the highlighting of matches currently expanded on screen will occur, giving you a faster alternative to performing a large-scale search.

Navigate between your specified keywords quickly

You can execute a search query using ENTER or the right and left arrow icons (“find next” (F3) and “find previous” (Shift+F3), respectively) shown below. If you are not a fan of scrolling to the items you want, clicking the arrows are also used to navigate through each found match. We based the search navigation on a depth first search model, meaning that matches are found by diving as far into the selected variable as specified before looking for matches within the next variable. You don’t have to sit through the full search if you don’t want to because search can also be cleared and canceled at any time, whether the search is ongoing or not.

Search for items deeply nested in your code

Unable to find what you’re looking for on your initial search? We’ve provided a “Search Depth” drop down to find matches nested X number of levels deep into your objects, where levels are defined similarly to levels in a tree data structure context. This option gives you the power to choose how thorough you want to search inside your objects (up to 10 levels), letting you decide how long or short the search process takes.

When you are searching for items that are already expanded and visible on your screen, these items will always be returned as matches no matter what search depth you have specified. Having to loop back to the item you want after passing it can be a pain, so setting the search depth to 1 will allow you to navigate to previous matches using the “find previous” arrow icon.

Excited to start searching in the Watch, Autos, and Locals windows? Let us know in the comments!

For any issues or suggestions, please let us know via Help > Send Feedback > Report a Problem in the IDE. If you have any additional feedback about this feature, feel free to complete this brief survey.

Leslie Richardson, Program Manager, Visual Studio Debugging &amp Diagnostics
@lyrichardson01 Leslie is a Program Manager on the Visual Studio Debugging and Diagnostics team, focusing primarily on improving the overall debugging experience and feature set.

Viewing all articles
Browse latest Browse all 5971

Trending Articles