Can't launch VS2005 profiler against app that uses redirection on the command line

Hi,

I've been trying for a while today to profile a simple C++ app, and finding that the profiler simply attaches and then immediately exits
Profiler started
Successfully attached to process: 5004
Exited from process: 5004
Collection file exited: C:\Develop\longevitas\longevitas\longevitas060621(18).vsp
Profiler exited
PRF0025: No data was collected.
===================== Profiling Complete =====================

The app compiles and debugs without a problem and I believe now the issue relates to the use of file redirection in the command line which is of this form:

myexe.exe <infile.csv par1 par2par3 >output3.xml

Setting "<infile.csv par1 par2par3 >output3.xml" for the project properties-> Configuration Properties -> Debugging -> Command Arguments, works fine, but it looks to me as if the launcher for the profiler isn't able to deal with it.

I even tried to run the command line tools and sure enough setting /launch and /args for vsperfcmd showed that the string "<infile.csv" was being passed in as the first string argument, so the app was terminating abnormally, presumably causing the rapid detach.

Am I correct, and is there any workaround?

I am using

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)

Microsoft .NET Framework
Version 2.0.50727

Thanks,

Gavin Ritchie.

[1414 byte] By [GavinRitchie] at [2007-12-21]
# 1

Hey Gavin,

Thanks for the detailed repro case to take a look at. I'll test out this scenario this morning to see if I can repro the issue and if I can, if there are any possible workarounds.

~Ian

IanHuff at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Performance Tools (Profiler)...
# 2

Gavin,

Sorry about the delay, things were quite busy from this end last week. So I confirmed that the profiler does not currently support command line redirection. I know that we have an code issue already filed on this, but I can't comment on if it will be fixed in later releases. However I will count your post as a vote for getting this feature in. For now, the best workaround that I can think of would be to use a small wrapper program to start up your app with the correct arguments.

Thanks,

Ian

IanHuff at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Visual Studio Performance Tools (Profiler)...

Visual Studio Team System

Site Classified