Rich Code Search results

Last Update: 4/4/2017

Team Services | TFS 2017

In the Code Search results page you can:

Go back Back to Search overview

Use the rich set of options in the results page

Choose a search result to see a rich view of that file with the search hits highlighted.

Search results are listed and matching words are highlighted

Notice that, if your search string matches part of a filename, the name is highlighted in the right pane when you select that match. The filename is also a hyperlink that opens the file in a new Code Explorer window so you can easily see the original source and the folder structure in the repository where it was found.

Matching filenames are highlighted

Analyze the changes made to the file using the search page features as well as the familiar features on the Explorer page. These feaures makes it easy to understand the evolution of the code, trace and debug issues, and contact the owners or experts for each part of the code.

Examine the search results to see file history and changes

  1. View the history of the changes and compare with other versions of the same file.
  2. Show the file details pane below or to the right of the list of results.
  3. View the selected file in full screen mode.
  4. Show the annotation blocks for the selected file (to see who changed the code).
  5. Scroll through the highlighted matches in all the results files (keyboard: F8 and Shift+F8).
  6. Download the selected file.

See more of the code file

You can quickly get a fullscreen view of the selected file using the expand Expand the file to fullscreen and shrink Shrink the file to a window icons in the toolbar. However, another way to see more of the file, while still being able to select files from the list of matching results, is to hide the left column filter pane by choosing the < icon at the top left of the column. Use the > icon to restore the filter pane.

Hide and show the Filters pane

If you want maximum screen width for long code lines, especially when using a portrait orientation screen, use the Preview pane: Right link at the top right of the window to display the code below the search results list.

Show the code below the search results list

Search remembers the state of the filter pane and position of the code view pane between sessions as part of your user preferences.

Trace code changes and contact the owner

Use the tabs and icons in the toolbar to see the evolution, history, and owner of the file. Choose the Show annotation blocks icon for a file to see the changes made by owners and other editors or developers. Choose a commit ID or change ID to see more details.

View annotations for a file to see the changes made by owners and others

Open the History tab to see a list of changes to the file, and details of the persons making these changes. Choose the description of the change to open the Compare pane, which shows the changes between this version and the previous version of the file.

Viewing the history for a file

Open the Compare tab to compare the current version of the file with other versions. Select the versions you want to compare in the dropdown lists. For example, in this screenshot, you can see the comparison between the versions from two Git commits. The differences between the versions are shown line by line.

Compare versions of the file

One of the powerful features of Code Search is the capability to expand your search interactively, based on the results of previous searches. For example, you can easily broaden your search to related files when tracing or debugging code.

Place the insertion point on a term in the file and open the shortcut menu (mouse: right-click) to start a new search for other files containing the selected term. You can search for it as text, for the definition if you select an object name, or for references to a selected object.

Widen the search using the commands in the shortcut menu

See also

Go back Back to Search overview

Got feedback?

Question Send your feedback to Post your ideas and feature requests on UserVoice.