Compartir a través de


How to: Install the stand-alone profiler

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Visual Studio provides a command line based stand-alone profiler that can be run without installing the Visual Studio IDE. This situation occurs when a computer does not or cannot have a development environment installed. For example, you should not install a development environment on a production web server.

Note

When you are using the stand-alone profiler to collect performance data for an ASP.NET web site, the VSPerfASPNetCmd line tool is recommended over VSPerfCmd tool.

To install the stand-alone profiler

  1. Download the Performance Tools for Visual Studio.

  2. Locate the stand-alone profile installer (vs_standaloneprofiler.exe) where you downloaded the performance tools and run it.

  3. Add the path for vsinstr.exe to the system path.

    Note

    To get the path to the profiling tools, see Specify the path to command line tools. On 64-bit computers, both 64-bit and 32-bit versions of the tools are available. To use the profiler command-line tools, you must add the tools path to the PATH environment variable of the Command Prompt window or add it to the command itself.

  4. At the command prompt, type VSInstr.

    Note

    If the usage information for vsinstr.exe is displayed, everything is set up correctly. If you see an error that states vsinstr.exe or one of its dependencies is not found, make sure that you have your paths set up correctly as described in step 2.

  5. Set up symbol server by setting your _NT_SYMBOL_PATH variable to symsrv*symsrv.dll*c:\localcache*https://msdl.microsoft.com/download/symbols

  6. After you set up your symbol server by using the system environment variables, run the command line profiler tools at a new command prompt. This allows the new environment variables to take effect. In the command prompt window, type the following command:

    start %COMSPEC%

    Note

    For detailed instructions about how to set up the symbol server package, see How to: Reference Windows symbol information.

  7. Use the VSPerfReport tool to serialize your symbols into the profiling data (.vsp) file. Use the VSPerfReport /summary:all /packsymbols switches. If you do not have symbols inserted in your data file, make sure that you have the _NT_SYMBOL_PATH environment variable set.

See also