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.
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