public override IProcessAsyncOperation Execute(ExecutionCommand command, IConsole console) { DummyProcessAsyncOperation dpao = new DummyProcessAsyncOperation(process); string profilerIdentifier, tempFile, snapshotFile; ProfilingService.GetProfilerInformation(process.Id, out profilerIdentifier, out tempFile); DotNetExecutionCommand dotcmd = (DotNetExecutionCommand)command; snapshotFile = profiler.GetSnapshotFileName(dotcmd.WorkingDirectory, tempFile); ProfilingService.ActiveProfiler = profiler; ProfilingContext profContext = new ProfilingContext(dpao, snapshotFile); profiler.Start(profContext); return(dpao); }
public override IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console) { DotNetExecutionCommand dotcmd = (DotNetExecutionCommand) command; string tempFile = Path.GetTempFileName (); string snapshotFile = profiler.GetSnapshotFileName (dotcmd.Command, tempFile); string args = string.Format ("--profile={2}:{3} --debug \"{0}\" {1}", dotcmd.Command, dotcmd.Arguments, profiler.Identifier, tempFile); NativeExecutionCommand cmd = new NativeExecutionCommand ("mono", args, dotcmd.WorkingDirectory, dotcmd.EnvironmentVariables); IProcessAsyncOperation pao = base.Execute (cmd, console); ProfilingService.ActiveProfiler = profiler; ProfilingContext profContext = new ProfilingContext (pao, snapshotFile); profiler.Start (profContext); return pao; }