Share via


Test and troubleshoot apps with the Windows Phone Developer Power Tools

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

Windows Phone Developer Power Tools are three powerful testing and debugging tools for app developers packaged into a single user interface. Use the Power Tools to monitor your app's responsiveness and resource consumption and to debug its crashes. After you make fixes, run the tools again to verify the improved stability and performance of your app.

Introducing the Power Tools

The Power Tools include the three following tools. These are existing tools that have been adapted and customized for use by Window Phone developers.

  • Application Verifier. Detect subtle programming errors in native code.

  • Performance Monitor. Capture real-time performance metrics and visualize them graphically.

  • Performance Recorder. Collect system-wide logs and analyze them on your computer.

You can launch the Power Tools from the Visual Studio Tools menu or from the Windows Start screen. The Power Tools run independently of Visual Studio - you don't have to have Visual Studio or your project open.

All three Power Tools share the following features.

  • You can test an app running in the emulator or on a Windows Phone 8.1 connected device.

  • When you're testing on a device, you can disconnect the device and the tools continue to run. Then you can use your phone and test your app under normal conditions. Later you can reconnect the device and analyze the output.

  • You can save the output of the tools to analyze later in Visual Studio or another desktop tool.

Installing the Update Pack on your phone

When you connect the Power Tools to a device for the first time, the tools prompt you to install a software update called the Update Pack on the device. This update installs the files required to run Power Tools on the device. These files are also required to run certain other debugging tools, such as the native memory profiler. To conserve space on Windows Phone devices, Microsoft does not install these files by default as part of the operating system.

Connecting and disconnecting

To begin using the Power Tools, select an emulator or device in the Select device drop-down list. Then click Connect.

When you're finished using the Power Tools, or you want to disconnect the device or connect to a different device, click Disconnect.

Application Verifier

Run Application Verifier to detect subtle programming errors in native code. Application Verifier is especially useful for debugging memory corruption and identifying critical security vulnerabilities.

Application Verifier in the Windows Phone Developer Power Tools provides a subset of the functionality of the full Application Verifier tool. For more info about the full Application Verifier tool, see Application Verifier.

  1. After you connect to a running emulator or to a connected device, the Installed Apps list is automatically populated with apps deployed on the emulator or device. Select an app in the list.

  2. In the list of available tests, select the check boxes for the tests you want to run.

  3. Click Apply to launch Application Verifier and begin testing.

    • If an exception occurs on the emulator or a connected device, you can debug the exception immediately in Visual Studio.

    • If an exception occurs while the device is disconnected, you can open the crash dump file later to debug in Visual Studio or in WinDbg.

  4. Optionally, disconnect the device. Use the phone and run your app under normal conditions. Later, reconnect the device.

  5. To end testing, clear the selected boxes and then click Apply.

Caution  When you apply AppVerifier to a Silverlight app, the AppVerifier settings are applied to all Silverlight apps on the device. This may have an unanticipated impact on the device.

 

Performance Monitor

Run Performance Monitor to capture real-time performance metrics and visualize them graphically. Performance Monitor is especially useful for visualizing how your running app uses system resources such as CPU and memory in real time.

  1. Select a process or all processes in the Process drop-down list.

    You can monitor the performance of a single process, such as your app, or of all processes. You can't select multiple processes.

  2. Click Start to begin monitoring and graphing performance metrics.

  3. Optionally, click Record to capture the performance data to a file. Later you can analyze this file in the desktop version of Performance Monitor. You'll see additional counters there that are not displayed in the Performance Monitor window of the Power Tools.

    If there's not enough storage available, an error occurs.

  4. Optionally, display a different counter in one of the graphs by clicking on the counter in the area to the right of the graph.

  5. Click Stop to stop monitoring and recording.

    If recording was enabled, the tool prompts you to save the performance log file on your computer as a CSV file for analysis in the desktop version of Performance Monitor.

Performance Recorder

Run Performance Recorder to capture system-wide performance logs. Performance Recorder is especially useful for advanced analysis of your app's performance and resource consumption.

Visual Studio can profile a single process, but Windows Performance Recorder gathers system-wide logs for more complete analysis. The Performance Recorder tool wraps the functionality of Windows Performance Recorder. Using this tool, you can catch subtle performance, memory, and power issues that are difficult to identify when analyzing only a single process. For example, you can capture the impact of background tasks and system activity while your app is running.

Performance Recorder in the Windows Phone Developer Power Tools provides a subset of the functionality of the full Windows Performance Recorder tool. For more info about the full Windows Performance Recorder tool, see Windows Performance Recorder.

After Performance Recorder captures the logs in an .ETL file, you can open the file for analysis in Windows Performance Analyzer. For more info, see Windows Performance Analyzer.

  1. In the Select profiles for performance recording list, select the data that you want to capture.

  2. Click Start to begin logging. Test your app.

  3. Click Stop to stop logging.

  4. Save the log file (an .ETL file) to your computer. Later you can open the file in Windows Performance Analyzer to analyze the data.