Cyrix
Cyrix

Reputation: 266

IntelliTrace stand-alone collector

I would like to set up min winforms app to use the IntelliTrace stand-alone collector.

Iv downloaded the application but I cant seem to find how I set it up to winforms.

It should be in this link I guess, but I dont quite understand: https://msdn.microsoft.com/en-us/library/hh398365(v=vs.110).aspx

Does anyone have any advice? Im trying to google to find examples without luck.

Best regards Rob

Upvotes: 2

Views: 1142

Answers (3)

user7380440
user7380440

Reputation:

  • Download Intellitrace standalone collector

  • Double click on the .exe file

  • Put the IntelliTraceCollectio.cab file in a folder. For example D:\Intellitrace

  • Open command prompt as an administrator Go to specified path of IntelliTraceCollectio.cab and enter the command

    expand /f:* IntelliTraceCollection.cab .

    (Don't forget to put . at end)

  • Using command prompt, enter

    icacls "D:\IntelliTrace" /grant

    (D:\Intellitrace is the path of your folder as specified above)

  • Create one more folder as D:\IntelliTraceLog (To store the collected intellitrace log file)

  • To collect data from an application, enter command

    D:\Intellitrace\IntelliTraceSC.exe launch /cp:"D:\Intellitrace\collection_plan.ASP.NET.default.xml" /f: "C:IntelliTraceLog\MyApp.itrace" "D:\xyz\abc.exe"

(D:\xyz\abc.exe is the actual path of your file you want to run)

  • Now you will get an itrace file in D:\IntelliTraceLog. Open it in visual studio enterprise. Select any exception and click on Run Debugging.

Upvotes: 1

Frison Alexander
Frison Alexander

Reputation: 3256

I have a powershell script that I use to collect traces from console applications. This should be the same for winforms (I've tested it against WPF application and it works). The only step I'm not sure on is what "Collection Plan" you need - this might take a lot of experimentation.

Good Luck!

#1) Create a C:\IntelliTrace   and place this script in there
$ROOT_DIR = $PSScriptRoot

#2) Extract the intellitrace cab file to C:\IntelliTrace\IntelliTraceCollection      folder

#3) Where is the path to the winforms executable?
$Prog = "C:\path\to\my\winformsApplication.exe"

#4) Where do you want to save the trace?
$OutputLog = "$ROOT_DIR\MyTrace.iTrace"

#Note use of relative paths
$IntelliTraceStandAlone = "$ROOT_DIR\IntelliTraceCollection\IntelliTraceSC.exe"

#YOU WILL MOST LIKELY NEED A DIFFERENT COLLECTION PLAN
$collectionPlan = "$ROOT_DIR\IntelliTraceCollection\collection_plan.ASP.NET.default.xml"

#5) Run it..
#Note "dot space $IntelliTrace..."
. $IntelliTraceStandAlone launch /logfile:$OutputLog  /collectionplan:$collectionPlan $Prog

Upvotes: 1

Mao
Mao

Reputation: 107

You need to use IntelliTrace stand-alone collector to launch your WinForm application. You can find the reference from the link you posted https://msdn.microsoft.com/en-us/library/hh398365.aspx#BKMK_Collect_Data_from_Executables

PowerShell cmdlet is for web application or sharepoint application. For other managed application, the command you should use is

<FullPathToIntelliTraceCollectorExecutable> \IntelliTraceSC.exe launch /cp: <PathToCollectionPlan> /f: <FullPathToITraceFileDirectoryAndFileName> <PathToAppExecutableFileAndFileName>

Upvotes: 0

Related Questions