Partager via


CrossSession

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

The VSPerfCmd.exe CrossSession option enables the profiler to collect data from any console session. The CrossSession option must be used with the Start option.

You can use the abbreviation CS in place of CrossSession.

Syntax

VSPerfCmd.exe /Start:Method /CrossSession [Options]

Parameters

None

Valid Options

To enable profiling in another session, the CrossSession option must be specified with the Start option. CrossSession must also be specified in any subsequent VSPerfCmd Attach and Detach commands.

Start: Method The Start option initializes the profiler to the specified profiling method.

Attach: PID[,PID] Begins profiling the specified processes.

Detach[:PID[,PID]] Stops profiling the specified processes.

Example

In this example, the CrossSession option is used to attach to an application that was started in another console session.

VSPerfCmd.exe /Start:Sample /Output:TestApp.exe.vsp /CrossSession
VSPerfCmd.exe /Attach:12345 /CS

See also