IntelliTrace not logging

扶醉桌前 提交于 2019-12-24 05:45:11

问题


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.

  1. launch switch works because it starts an application and IntelliTrace logger and attaches IntelliTrace to this application.
  2. 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).
  3. 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.
  4. The only difference between run and start switches is that start switch starts IntelliTrace logger in the background.
  5. 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?

  1. Start IntelliTrace using launch switch.
  2. Start Process Explorer.
  3. Find your application in the tree of all processes.
  4. Right click it and select Properties...
  5. Go to Environment tab.
  6. Find COR_PROFILER variable.
  7. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!