As your codebase expands and is divided across multiple projects and repositories, finding what you need becomes increasingly difficult. To maximize cross-team collaboration and code sharing, you need a solution that can quickly and efficiently locate relevant information across all of your projects.
From discovering examples of an API's implementation, browsing its definition, to searching for error text, Code Search delivers a one-stop solution for all your code exploration and troubleshooting needs.
Code Search is available for Azure DevOps Services (formerly knows as Visual Studio Team Services) and Azure DevOps Server (formerly knows as Team Foundation Server) starting with TFS "15". You can configure Code Search as part of the Azure DevOps Server configuration. For more details see Administer Search.
##Search across one or more projects Start searching for code using the search box on the top right corner.
Or you can use the context menu from the code explorer.
Code Search enables you to search across all repositories, so you can focus on the results that matter most to you.
##Semantic ranking Ranking ensures you get what you are looking for in the first few results. Code Search uses code semantics as one of the many signals for ranking, ensuring that the matches are laid out in a relevant manner. E.g. Files where the given term appears as definition, are ranked higher.
##Rich filtering Get that extra power from Code Search that lets you filter your results by project, repo, branch, file path, and extension. You can also filter by code type, such as definition, comment, reference, and much more. And, by incorporating logical operators such as AND, OR, NOT, refine your query to get the results you want.
##Integration with version control The Code Search interface integrates with familiar controls in Azure Repos, giving you the ability to look up History, compare what’s changed since the last commit or changeset, Blame and much more.
Note: Stakeholders do not have access to code so this is unavailable to them.
Suggestions, questions, and bugs
If you have any features suggestions, questions, or bugs then please read the search documentation to see if it helps. You can raise a feature suggestion or report a problem regarding Azure DevOps search on the Azure DevOps developer community.