Обучение
Модул
Build reports and review insights - Training
This lab provides insights into the emission activity trends in Microsoft Cloud for Sustainability.
Този браузър вече не се поддържа.
Надстройте до Microsoft Edge, за да се възползвате от най-новите функции, актуализации на защитата и техническа поддръжка.
Learn time-saving tips for using Build Insights.
This feature requires Visual Studio 2022 17.12 or later.
If you're working on a specific file or files, and want to see how they impact your build time, you can run Build Insights on just those files. This feature is useful when you want to focus on a subset of files in your project.
To try it, in Solution Explorer select the files in your project you want to profile, right-click, and choose Run Build Insights on Selected Files:
This feature requires Visual Studio 2022 17.12 or later.
If you have a large solution with many projects, you can filter the Build Insights results to see files only the projects you're interested in. This feature is useful when you want to focus on a subset of projects in your solution.
To try it, click the filter button on the filter column header and select the projects you want to see results for:
The filter button is selected and a list of projects appears. Checkboxes next to two projects are checked.
You can also use file wildcards to filter results. The search is case-insensitive and you should use forward slashes (/
) as path separators:
This allows you to exclude files from a specific folder or only include files from a specific folder. For example, if your source is located at C:\src\
, you could include files only from the renderer directory and its subdirectories by putting C:/src/dev/renderer/**
into the files to include text box. Use forward slashes (/
) as path separators.
Here are some other examples:
C:/src/dev/renderer/*
C:/src/dev/renderer/
directory and all its subdirectories: C:/src/dev/renderer/**
C:/src/dev/renderer/
directory and all its subdirectories: C:/src/dev/renderer/**/*.h
For more examples, see the online glob pattern tester.
The filter you enter into either text box persists per solution. Filtering by wildcards isn't supported for CMAKE projects.
This feature requires Visual Studio 2022 17.12 or later.
Now you can designate a folder to automatically save Build Insight reports to so you can easily access them.
To set the designated folder, go to Tools > Options > C++ Build Insights > Trace Collection. Set a path in the Store Build Insights reports in this directory textbox:
In the left pane, Build Insights > Trace Collection is selected. In the collection settings, the checkbox for Store Build Insights reports in this directory is selected, and the directory text box contains the path c:\users\contoso\workspace as an example.
Reports are automatically saved to this folder when you run Build Insights. If a path isn't set, the TEMP
folder is used.
This feature requires Visual Studio 2022 17.12 or later.
To see a short description for the tabs in the Build Insights window, along with a link to the documentation for a detailed explanation, click the question mark icon in the Build Insights window:
Build Insights in Visual Studio video - Pure Virtual C++ 2023
Improving code generation time with C++ Build Insights
Troubleshoot header file impact on build time
Tutorial: Troubleshoot function inlining on build time
Обучение
Модул
Build reports and review insights - Training
This lab provides insights into the emission activity trends in Microsoft Cloud for Sustainability.
Документация
Troubleshoot function inlining on build time
Tutorial for how to use Build Insights function view to troubleshoot the impact of function inlining on build time in your C++ projects.
Learn how to use C++ Build Insights to analyze and optimize your builds.
Troubleshoot header file impact on build time
Tutorial on how to use Build Insights Includes Files and Includes Tree views to troubleshoot the impact of #include files on build time.