问题
I have been using IntelliTrace.exe for wpf application to collect the iTrace log. IntelliTrace.exe resides in the below system path "C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\TraceDebugger Tools"
When I use IntelliTrace with launch switch its working fine.
IntelliTrace.exe launch /cp:"mycollectionplan.xml" /f:"iTraceFilewithFullpath" "ApplicationwithFullpath" - LAUNCH CMD
But when I use IntelliTrace with start or run,iTrace file of size around 160,000 KB has been created and when I stop it it turns back to 576 KB
IntelliTrace.exe start /cp:"mycollectionplan.xml" /f:"iTraceFilewithFullpath" "ApplicationwithFullpath" - START CMD
IntelliTrace.exe run /cp:"mycollectionplan.xml" /f:"iTraceFilewithFullpath" "ApplicationwithFullpath" - RUN CMD
IntelliTrace.exe stop /cp:"mycollectionplan.xml" /f:"iTraceFilewithFullpath" "ApplicationwithFullpath" - STOP CMD
Please advise on this issue
Let me know do we have any way to start and stop logger whenever needed
回答1:
I have a few comments.
- launch switch works because it starts an application and IntelliTrace logger and attaches IntelliTrace to this application.
- run / start switches do something different. They only start IntelliTrace logger. The application should be started later manually. However, it should be started in the proper way (I'll desribe it later).
- If you run either IntelliTrace help run comamnd or IntelliTrace help switch command in the command line, you will see that these switches do not expect a path to your application.
- The only difference between run and start switches is that start switch starts IntelliTrace logger in the background.
- You shouldn't start (as in your example) two IntelliTrace loggers that will use the same log.
Here is an example showing how to use start switch
In the command line do the following steps. Firstly let's start IntelliTrace logger called test:
IntelliTrace.exe start /n:test /f:iTraceFilewithFullpath /cp:mycollectionplan.xml
Now we need to enable profiling:
set COR_ENABLE_PROFILING=1
Now we should say which profiler we want to use. It is important to use a proper identifier/GUID here. I'll explain how to find it later.
set COR_PROFILER={b19f184a-cc62-4137-9a6f-af0f91730165}
The next step is to say which IntelliTrace logger we want to use to monitor our application. In our case it's called test:
set VSLOGGERNAME=test
Now we are ready to start our program:
ApplicationwithFullpath
At the end we should stop IntelliTrace logger:
IntelliTrace.exe stop /n:test /cp:mycollectionplan.xml
How to find GUID of Intellitrace?
- Start IntelliTrace using launch switch.
- Start Process Explorer.
- Find your application in the tree of all processes.
- Right click it and select Properties...
- Go to Environment tab.
- Find COR_PROFILER variable.
- Copy it's value. It's our GUID.
As you can see it is much more easier to use launch switch.
回答2:
Can you double check that you don't cap the log file size in your collection plan? The maximum log file can be set with .
来源:https://stackoverflow.com/questions/36912563/intellitrace-not-logging