Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Gather Instrumentation Data using Command-line Tools

Visual Studio 2005

You can use either the IDE or the VSInstr command-line tool to instrument your application. In this topic, we will use command-line tools to instrument code.


Command-line tools are located in C:\Program Files\Microsoft Visual Studio 8\Team Tools\Performance Tools> directory.


To include symbol information in release build, see How to: Use Symbol Servers.

To instrument a binary using the command-line tool

  1. Open a command line window. At the command prompt, run the following command to instrument your binary:

    C:\<path>vsinstr c:\<path>\application_name.exe /control:thread

    The original binary is renamed with .orig extension. A copy of the original file is instrumented.

  2. At the command prompt, run the following command to launch VSPerfCmd:

    C:\<path>vsperfcmd /trace /output:c:\<path>

    A report with .VSP extension is created in the folder specified in the /output option.

  3. Start your application from the command line.

  4. Run your application's scenarios to generate performance data.

  5. Exit your application.

  6. At the command prompt, run the following command to shut down the performance monitor:

    c:\<path>vsperfcmd /shutdown

  7. Open the .VSP file in the IDE to examine performance data.

See Also



Community Additions

© 2015 Microsoft