Training
Learning path
Use advance techniques in canvas apps to perform custom updates and optimization - Training
Use advance techniques in canvas apps to perform custom updates and optimization
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Visual Studio offers a choice of performance measurement and profiling tools. Some tools, like CPU Usage and Memory Usage, can run either on release builds or while debugging your app (debug build). Tools that appear in the Diagnostics Tools window run only during a debugging session. Tools that appear in the Performance Profiler run without the debugger, typically on release builds, and you analyze the results after you choose to stop and collect data (for post-mortem analysis).
The Performance Profiler and the debugger-integrated Diagnostic Tools provide different information and experiences. While using the Diagnostic Tools, the debugger shows you variable values and lets you use breakpoints.
Release build performance numbers in the Performance Profiler are the most precise and accurate. These tools give you results closer to the end-user experience. Typically, this is the preferred method for using the profiling tools. However, there may be scenarios where using the debugger in a debug build may help to narrow down the performance problem, especially if you want to use debugger features such as breakpoints and code stepping.
To help you decide between using the profiling tools in release or debug builds, consider the following:
To collect performance data on release builds, run the Performance Profiler tools.
With a project open in Visual Studio, set the solution configuration to Release, and select Local Windows Debugger (or Local Machine) as the deployment target.
Select Debug > Performance Profiler, or press Alt+F2.
On the diagnostic tools launch page, select one or more tools to run. Only the tools that are applicable to the project type, operating system, and programming language are shown. Select Show all tools to also see tools that are disabled for this diagnostic session.
To start the diagnostic session, select Start.
While the session is running, some tools show graphs of real-time data on the diagnostic tools page, and might show options to pause and resume data collection.
To end the diagnostic session, select Stop Collection.
The analyzed data appears on the Report page.
For more information about the tools available for use in release builds and how to analyze the reports, see:
Note
Use relaunch to skip the launch page and automatically run with your previous settings with Alt+F2 or by clicking Debug > Performance Profiler.
(Optional) Save the report, and then you can open it later from the Recently Opened Sessions list on the Diagnostic Tools launch page.
When you start debugging in Visual Studio by selecting Debug > Start Debugging, or pressing F5, the Diagnostic Tools window appears by default. To open it manually, select Debug > Windows > Show Diagnostic Tools. The Diagnostic Tools window shows information about events, process memory, CPU usage, and .NET Counters.
When you start debugging in Visual Studio by selecting Debug > Start Debugging, or pressing F5, the Diagnostic Tools window appears by default. To open it manually, select Debug > Windows > Show Diagnostic Tools. The Diagnostic Tools window shows information about events, process memory, and CPU usage.
Select Settings in the Settings drop-down list to open the Diagnostic Tools Property Pages with more options.
If you're running Visual Studio Enterprise, you can enable or disable IntelliTrace by going to Tools > Options > IntelliTrace.
The diagnostic session ends when you stop debugging.
For more information about the tools available while debugging, see:
During a debugging session, the Events tab of the Diagnostic Tools window lists the diagnostic events that occur. The category prefixes Breakpoint, File, and others, let you quickly scan the list for a category, or skip the categories you don't care about.
Use the Filter drop-down list to filter events in and out of view, by selecting or clearing specific categories of events.
Use the search box to find a specific string in the event list. Here are the results of a search for the file name model that matched three events:
Use the search box to find a specific string in the event list. Here are the results of a search for the string name that matched four events:
For more information, see Searching and filtering the Events tab of the Diagnostic Tools window.
To measure performance data from the command line, you can use VSDiagnostics.exe, which is included with either Visual Studio or the Remote Tools. This is useful for capturing performance traces on systems where Visual Studio isn't installed, or for scripting the collection of performance traces. For detailed instructions, see Measure application performance from the command line.
Training
Learning path
Use advance techniques in canvas apps to perform custom updates and optimization - Training
Use advance techniques in canvas apps to perform custom updates and optimization