Quickstart: Search the code base of a public project
Azure DevOps Services
In this quickstart, you learn how to search the code base of a public projects. With code search, you can locate specific types of code and easily narrow or widen your search.
Start a search
To start your search, choose Repos > Files or other page under Repos, enter a keyword or phrase in the search box, and press Enter or choose
start search.

View and work with search results
The search page shows a list of the matching code files. The selected file has all instances of the search string highlighted. If you see a list of work items, ensure that Code is selected in the upper left.

Assemble more complex search strings using the operators and functions listed in the drop-down list. Select the filter function or code type you want to include in your search string, and then enter the criteria value.

You can find all instances of "ToDo" comments in your code by selecting
comment:and typingtodo.You can search in specific locations, such as within a particular path, by using a search string such as
Driver path:MyShuttle/Server.You can search for files by name, such as
Driver file:GreenCabs.cs, or just by file extension. For example, the search stringerror ext:resxcould be useful when you want to review all error strings in your code. But even if your plain text search string, without specific file type functions, matches part of a filename, the file appears in the list of found files.You can combine two or more words by using Boolean operators; for example,
validate OR release.You can find an exact match to a set of words by enclosing your search terms in double-quotes. For example,
"Client not found".You can use the code type search functions with files written in C#, C, C++, Java, and Visual Basic.NET.
Fine-tune your search
Narrow your search to a specific repo, branch, file path, or code type by selecting from the drop-down lists at the upper portion of the page.

Use the tabs in the results page to view the History of the file or to Compare versions of the file. Choose Blame to view the last commit, person, and date to modify the file.

Open the search results in a new browser tab from either search box by pressing Ctrl + Enter or by holding Ctrl and selecting
start search.
In Google Chrome, press Ctrl + Shift + Enter to switch the focus
to the new browser tab.Choose the filename link at the upper portion of this column to open the file in a new Code Explorer window.

Next steps
Povratne informacije
Pošalјite i prikažite povratne informacije za