<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Matthew Saffer's IntelliTrace Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/msaffer/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/msaffer/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:09:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Using IntelliTrace with Services</title>
      <link>https://docs.microsoft.com/archive/blogs/msaffer/using-intellitrace-with-services</link>
      <pubDate>Wed, 23 Feb 2011 14:58:00 GMT</pubDate>
      <dc:creator><![CDATA[MSaffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msaffer/2011/02/23/using-intellitrace-with-services/</guid>
      <description><![CDATA[I've had a few people ask how to use IntelliTrace for monitoring Windows Services.&nbsp; While this...]]></description>
      <content:encoded><![CDATA[<p>I've had a few people ask how to use IntelliTrace for monitoring Windows Services.&nbsp; While this is not a supported scenario, we can make it happen.</p>
<p>As I've said in <a href="https://blogs.msdn.com/b/msaffer/archive/2010/12/07/using-intellitrace-outside-the-ide.aspx" title="other blog posts">other blog posts</a>, it is possible to use IntelliTrace outside of the IDE.&nbsp; The key to having any process using the CLR monitored by IntelliTrace are 3 environment variables:</p>
<ul>
<li>COR_ENABLE_PROFILING</li>
<li>COR_PROFILER</li>
<li>VSLOGGER_CPLAN</li>
</ul>
<p>The first two environment variables, COR_ENABLE_PROFILING and COR_PROFILER are respected by the CLR.&nbsp; When a process calls CLRCreateInstance (for clr versions &gt;=4) or CorBindToRuntime/CorBindToRuntimeEx, the CLR checks the environment for these environment variables.&nbsp; If COR_ENABLE_PROFILING is set to 0x1 or 1, the CLR will then read the value of the environment variable COR_PROFILER for a CLSID value, and attempt to instantiate a COM object for CLR profiling.</p>
<p>The third environment variable specifies the location for IntelliTrace to pick up its' settings, reffered to as the Collection Plan.&nbsp; You can find a default Collection Plan (with all diagnostics turned off) in %PROGRAMFILES%\Microsoft Visual Studio 10.0\Team Tools\TraceDebugger Tools\en\CollectionPlan.xml (for non EN-US users, look under TraceDebugger Tools\LANG\CollectionPlan.xml.)</p>
<p>The values to set for the process are:</p>
<p>COR_ENABLE_PROFILING=1</p>
<p>COR_PROFILER={301EC75B-AD5A-459C-A4C4-911C878FA196}</p>
<p>VSLOGGERCPLAN=&lt;Path-to-the-CollectionPlan.xml&gt; (you need to <strong>fill this one in</strong> :)</p>
<p>It is&nbsp;important to keep in mind that the process being launched must have Read permissions for&nbsp;the Collection Plan.</p>
<p>Additionally, one <strong>must</strong> also fill in a value for the &lt;LogFileDirectory&gt; element in the &lt;StartupInfo&gt; element of the collection plan. If it is not filled in, the IntelliTrace.exe logger will attempt to write the .iTrace file next to the executable being used.&nbsp; In the case of a service, this is not a writeable location (svchost.exe is located in a system directory.)</p>
<p>So how do we make this work for Services?&nbsp; We have to set up the service's environment so that it may inherit these environment variables, then when the process starts, IntelliTrace will start collecting. When the process shuts down, the .iTrace file will be readable. Now we have to get the environment set up.&nbsp; We can do this via the registry.</p>
<p>&nbsp;</p>
<p>Let's say that our service is called MyAwesomeService.&nbsp; Then you would want to open RegEdit and navigate to the key:</p>
<p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MyAwesomeService.&nbsp; Under this key, it is possible to set the environment by creating (or modifying if it already exists) a "Multi-String Value" or REG_MULTI_SZ key with the name "Environment".&nbsp; </p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/4747.CreateKey.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/4747.CreateKey.png" border="0" /></p>
<p>&nbsp;Create a Multi-String Value</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/3884.KeyEnvironment.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/3884.KeyEnvironment.png" border="0" /></p>
<p>With the name "Environment"</p>
<p>&nbsp;</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/8308.Multi-Value-Entry.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/8308.Multi_2D00_Value_2D00_Entry.png" border="0" /></p>
<p>And populate it with your settings</p>
<p>Once you have inserted the aforementoned environment variables into this Environment key, and restart the service using "net stop MyAwesomeService" followed by "net start MyAwesomeService".&nbsp; At this point, an IntelliTrace.exe process should have launched (assuming managed code has run in the process).&nbsp; Simply "net stop MyAwesomeService" and open the iTrace file to view what happened.</p>
<p>Hopefully this has been a useful and easy-to-follow blog post. If you have any questions or trouble following these steps, let me know so I can help out and also fix my instructions.</p>
<p>--Matthew</p>]]></content:encoded>
    </item>
    <item>
      <title>Using IntelliTrace with Azure sans Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/msaffer/using-intellitrace-with-azure-sans-visual-studio</link>
      <pubDate>Wed, 23 Feb 2011 14:39:00 GMT</pubDate>
      <dc:creator><![CDATA[MSaffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msaffer/2011/02/23/using-intellitrace-with-azure-sans-visual-studio/</guid>
      <description><![CDATA[Grant Holliday, the Program Manager for TFS has just released a great blog post on how to use...]]></description>
      <content:encoded><![CDATA[<p>Grant Holliday, the Program Manager for TFS has just released a great blog post on how to use IntelliTrace with Azure machines (which surely do not have Visual Studio installed on them.)&nbsp; </p>
<p>Since IntelliTrace can collect data and report it back via .iTrace files, this workflow is invaluable to users deploying Azure services in diagnosing issues like infinite reboots during the "Starting role" step, or determining what is causing a TypeLoadException to bring down your service.</p>
<p>The instructions Grant lays out are easy to understand and follow. Check it out <a href="https://blogs.msdn.com/b/granth/archive/2011/02/20/intellitrace-for-azure-without-visual-studio.aspx" title="over at his blog">over at his blog</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Announcing IntelliTrace Visual Studio 2010 SP1 - F5 collection of 64-bit and Sharepoint</title>
      <link>https://docs.microsoft.com/archive/blogs/msaffer/announcing-intellitrace-visual-studio-2010-sp1-f5-collection-of-64-bit-and-sharepoint</link>
      <pubDate>Tue, 07 Dec 2010 21:11:00 GMT</pubDate>
      <dc:creator><![CDATA[MSaffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msaffer/2010/12/07/announcing-intellitrace-visual-studio-2010-sp1-f5-collection-of-64-bit-and-sharepoint/</guid>
      <description><![CDATA[It is my pleasure to announce that with the release of Service Pack 1 Beta&nbsp;for Visual Studio...]]></description>
      <content:encoded><![CDATA[<p>It is my pleasure to announce that with the release of Service Pack 1 Beta&nbsp;for Visual Studio 2010 Ultimate, IntelliTrace will support both 64-bit applications, and Sharepoint projects.</p>
<p>Right now, if you are an MSDN subscriber, you can download the <a href="https://go.microsoft.com/fwlink/?LinkId=207267" title="SP1 Beta for Visual Studio 2010 Ultimate ">SP1 Beta for Visual Studio 2010 Ultimate</a>.</p>
<p>Otherwise, on Thursday there will be a general availability release of Visual Studio 2010 SP1 Beta <a href="https://go.microsoft.com/fwlink/?LinkId=207130" title="here">here</a>.</p>
<p>Once you install SP1 Beta, you will be able to hit F5 and start debugging 64-bit applications and Sharepoint applications with IntelliTrace!</p>
<p>64-bit F5&nbsp;debugging with IntelliTrace is a feature that the entire team has heard customers pine for - so download the beta, use IntelliTrace F5&nbsp;to find your 64-bit and Sharepoint bugs; and please, provide feedback!&nbsp; We would love to hear about your troubles, tribulations, and successes with IntelliTrace.</p>]]></content:encoded>
    </item>
    <item>
      <title>Using IntelliTrace outside the IDE - 64-bit Applications</title>
      <link>https://docs.microsoft.com/archive/blogs/msaffer/using-intellitrace-outside-the-ide-64-bit-applications</link>
      <pubDate>Tue, 07 Dec 2010 20:17:00 GMT</pubDate>
      <dc:creator><![CDATA[MSaffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msaffer/2010/12/07/using-intellitrace-outside-the-ide-64-bit-applications/</guid>
      <description><![CDATA[IntelliTrace is one of my favorite features in Visual Studio Ultimate 2010, alongside the debugger...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">IntelliTrace is one of my favorite features in Visual Studio Ultimate 2010, alongside the debugger and the new C++ IntelliSense and VC++ libraries. </span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">There are some neat things that I've done using IntelliTrace without the IDE at all, such as collecting from 64-bit applications, monitoring test runs that I can't use Microsoft Test Manager to test, and much more.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">I'm going to show you how to use the command line to collect and IntelliTrace log from a 32-bit or&nbsp;64-bit process.</span>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-family: Calibri; font-size: small;"><strong><span style="text-decoration: underline;">Locating the Collection Plan</span></strong></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Inside of the "Team Tools\TraceDebugger Tools" directory beneath the Visual Studio 2010 installation, you will find two files:</span></span></p>
<ul>
<li>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">IntelliTrace.exe</span></span></p>
</li>
<li>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">en\CollectionPlan.xml</span></span></p>
</li>
</ul>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">If you are using a version of VS 2010 that is not English, you will find the CollectionPlan.xml file under a directory named after your localized language name.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">These two files allow us to use IntelliTrace without the IDE at all.<span style="mso-spacerun: yes;">&nbsp; </span>The easiest way to launch an application with IntelliTrace is to use the <i style="mso-bidi-font-style: normal;">launch</i> command:</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: courier new,courier;"><span style="font-size: x-small;">IntelliTrace.exe launch /collectionplan:CollectionPlan.xml /file:out.iTrace MyAwesomeExecutable.exe</span></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">When you use the launch command you will see something similar to this:</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/8750.launch.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/8750.launch.png" border="0" /></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span>&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">And you will have a newly created file out.iTrace. Let's take a look at the iTrace file:</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/3113.ide_no_data.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/3113.ide_5F00_no_5F00_data.png" border="0" /></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span>&nbsp;</p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">That's a bit strange - where is all of my IntelliTrace data?</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The data you normally would expect to be in an iTrace file won't be present because the right options were not turned on for the collection session.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The default collection plan does not have any sort of collection enabled, and as such will not collect any data when used. Once we fix this, we can start collecting the data we need.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><strong><span style="text-decoration: underline;">Getting Collection Options Set Up</span></strong>&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The first step should be turning on the correct type of instrumentation. When modifying the collection plan, the first thing you should do is to turn on "DiagnosticEventInstrumentation" -- you can enable it by changing the following line (line 44 in the default Dev10 english collection plan)</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;DiagnosticEventInstrumentation enabled="false"&gt;</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">change this to</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;DiagnosticEventInstrumentation enabled="<b style="mso-bidi-font-weight: normal;">true</b>"&gt;</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">This should always be turned on if you are going to be using IntelliTrace in the scenarios I'm going to describe, or you will be missing key information important for the log.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Note: <span style="mso-spacerun: yes;">&nbsp;</span>For those of you curious as to what you will be missing, exception tracing and other features rely on having DiagnosticEventInstrumentation enabled, even if no events are turned on.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Now that DiagnosticEventInstrumentation is enabled, you have a multitude of collection options that are applicable.</span></span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">To turn the dial up you can turn on TraceInstrumentation which will turn on tracing for function enters and exits, as well as parameter capturing.<span style="mso-spacerun: yes;">&nbsp; </span>This is the setting that corresponds to &ldquo;Methods and Parameters&rdquo; in the IntelliTrace Tools-&gt;Options window.</span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"></span></span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><strong><span style="text-decoration: underline;">Collect Your Data!</span></strong></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">By turning on these types of Instrumentation, it is possible to now re-run our scenario (<i style="mso-bidi-font-style: normal;">IntelliTrace.exe launch /cp:CollectionPlan.xml /f:out.iTrace MyAwesomeExecutable.exe</i>) and we will get the data we expect, loadable by any Dev10 Ultimate installation.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><strong><span style="text-decoration: underline;">Here Be Dragons!</span></strong></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The information below is not to be depended upon.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">There are other ways to get IntelliTrace to collect information from a process.<span style="mso-spacerun: yes;">&nbsp; </span>One way is to:</span></span></p>
<ol>
<li>
<p class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Start a logger with a specific name</span></span></p>
</li>
<li>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">Start a process with COR_PROFILER, COR_ENABLE_PROFILING, and VSLOGGERNAME/VSLOGGER_CPLAN set.</span></span></p>
</li>
<li>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: Calibri;">Stop the logger when you are done with your collection.</span></span></p>
</li>
</ol>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The way that the IntelliTrace profiler gets set up is the same as any other .NET profiler:</span></span></p>
<ol>
<li>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The environment variable COR_ENABLE_PROFILING has to be set to 0x1 or 1</span></span></p>
</li>
<li>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The environment variable COR_PROFILER has to be set to the CLSID of a profiler that has been registered with the system.</span></span></p>
</li>
</ol>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">For our scenario to work, the environment variable VSLOGGERNAME has to be set to the name of the logger, in <strong>lowercase-only</strong> letters, or the environment variable VSLOGGER_CPLAN has to point to a Collection Plan that is readable by the process being launched.</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Since this is all quite tedious, we provide IntelliTrace Launch to make this whole process work. But if you are feeling on the wild side:</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<ol>
<li>
<p class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Start a logger &ndash; run &ldquo;IntelliTrace.exe start /cp:PathToCollectionPlan.xml /f:iTraceLogFileLocation.iTrace /name:session1&rdquo; &ndash; where:</span></span></p>
<ul>
<li>
<p class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">PathToCollectionPlan.xml is the path to the collection plan</span></span></p>
</li>
<li>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">iTraceLogFileLocation.iTrace is where you want the IntelliTrace log file to be placed</span></span></p>
</li>
<li>
<p class="MsoListParagraphCxSpLast"><span style="font-size: small;"><span style="font-family: Calibri;">session1 is a unique name for the logger.</span></span></p>
</li>
</ul>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">You should get output similar to this:</span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/36/29/2311.start_logger.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-36-29/2311.start_5F00_logger.png" border="0" />&nbsp;</span></o:p></p>
<p class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri; font-size: small;"></span></span></span></p>
</li>
<li>
<div class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Set COR_PROFILER, COR_ENABLE_PROFILING, and VSLOGGERNAME to the correct values for the environment.<span style="mso-spacerun: yes;">&nbsp; </span>Then launch your application. If you are using the windows command prompt (cmd.exe):</span></span></div>
<ul>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set COR_PROFILER={301EC75B-AD5A-459C-A4C4-911C878FA196}</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set COR_ENABLE_PROFILING=0x1</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set VSLOGGERNAME=session1</span></span></div>
</li>
</ul>
<p class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font: 7pt 'Times New Roman';">&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Note that the logger name is all lowercase.</span></span></p>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">When you are done (your process has exited,) the logger should have stopped on its&rsquo; own. If not, you can stop the logger using the following command: &ldquo;IntelliTrace .exe stop /n:session1&rdquo;</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">Finally you are done - you can now open your iTrace file and inspect the collected data.</span></span></div>
</li>
</ol>
<p class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">If you do not want to start a logger manually, you may:</span></span></p>
<ol>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">
<div class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Place the Collection Plan in a directory that is readable by the process you want to instrument</span></span></div>
</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">
<div class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Set the elements &lt;LogFileDirectory&gt; and &lt;LogFileName&gt; in the &lt;StartupInfo&gt; element to a valid location and name.</span></span></div>
</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">
<div class="MsoListParagraphCxSpFirst"><span style="font-size: small;"><span style="font-family: Calibri;">Set COR_PROFILER, COR_ENABLE_PROFILING, and VSLOGGER_CPLAN to the correct values for the environment.<span style="mso-spacerun: yes;">&nbsp; </span>Then launch your application. If you are using the windows command prompt (cmd.exe):</span></span></div>
<ul>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set COR_PROFILER={301EC75B-AD5A-459C-A4C4-911C878FA196}</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set COR_ENABLE_PROFILING=0x1</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">set VSLOGGER_CPLAN=c:\temp\collectionplan.xml</span></span></div>
</li>
</ul>
</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">Start your process.</span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpMiddle"><span style="font-size: small;"><span style="font-family: Calibri;">Once your process has exited you are done - you may now open your iTrace file an inspect the collected data.</span></span></div>
</li>
</ol>
<p>&nbsp;</p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;"></span></o:p></p>
<p class="MsoNormal"><span style="font-family: Calibri; font-size: small;">I hope this has been a useful blog post for getting IntelliTrace collection working outside of the IDE.<span style="mso-spacerun: yes;">&nbsp; </span>For questions or other queries please contact me&nbsp;using the "<a href="https://blogs.msdn.com/b/msaffer/contact.aspx" title="E-mail The Author ">E-mail The Author</a>" link&nbsp;on the right.</span><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>]]></content:encoded>
    </item>
    <item>
      <title>An informal introduction</title>
      <link>https://docs.microsoft.com/archive/blogs/msaffer/an-informal-introduction</link>
      <pubDate>Tue, 29 Jun 2010 15:08:00 GMT</pubDate>
      <dc:creator><![CDATA[MSaffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msaffer/2010/06/29/an-informal-introduction/</guid>
      <description><![CDATA[I&rsquo;m Matthew Saffer, a Software Development Engineer on the IntelliTrace team.&nbsp; I will use...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I&rsquo;m Matthew Saffer, a Software Development Engineer on the IntelliTrace team.<span style="mso-spacerun: yes">&nbsp; </span>I will use this blog to aid in understanding IntelliTrace and how it can help you through every step of your products&rsquo; lifecycle.<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Here&rsquo;s a little background on me:<o:p></o:p></span></span></p>
<h2 style="MARGIN: 10pt 0in 0pt"><span style="COLOR: windowtext"><span style="font-size: medium;"><span style="font-family: Cambria;">Who is this guy?<o:p></o:p></span></span></span></h2>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">I grew up in New Jersey (Only the strong survive there!)<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">I went to Carnegie-Mellon University for my BS in Computer Science<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I have been, and continue to be an avid cyclist, but only when the sun is out </span><span style="FONT-FAMILY: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</span></span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I enjoy working with all sorts of technology, but mostly software: arduinos, creating programming languages, web technologies and networking are currently piquing my interest.<o:p></o:p></span></span></p>
<h2 style="MARGIN: 10pt 0in 0pt"><span style="COLOR: windowtext"><span style="font-size: medium;"><span style="font-family: Cambria;">What do you do?<o:p></o:p></span></span></span></h2>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">After working with a web startup, and interning with Sony's Tools and Technology Group, I interned on the IntelliTrace team, and had such a great experience that I came back and have been working with IntelliTrace for the last 2+ years.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">I work on a few different parts of the IntelliTrace end-to-end scenarios:<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpFirst"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">1)</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">I am responsible for the IntelliTrace Events implementation in the IntelliTrace .NET profiler (including the IL Interpreter that IntelliTrace uses to speculatively execute methods and properties.)<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">2)</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">The Microsoft Test Manager / IntelliTrace integration is owned by me.<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">3)</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">All of the IIS and IntelliTrace interactions are owned by me as well (this stuff is tricky!)<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><span style="font-family: Calibri; font-size: small;">4)</span><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">I have aided in the creation and maintenance of IntelliTrace&rsquo;s serialization mechanisms.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes">&nbsp;</span>So to sum it up, I&rsquo;m a low-level plumbing type of guy.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">In the coming posts I will&nbsp;explain what kind of challenges these features presented, and the neat uses and options you can tweak.<o:p></o:p></span></span></p>
<h2 style="MARGIN: 10pt 0in 0pt"><span style="COLOR: windowtext"><span style="font-size: medium;"><span style="font-family: Cambria;">What&rsquo;s this IntelliTrace thing?<o:p></o:p></span></span></span></h2>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">My colleague Ian Huff has <a href="https://blogs.msdn.com/b/ianhu/archive/2009/05/13/historical-debugging-in-visual-studio-team-system-2010.aspx" title="a great introduction">a great introduction</a> about IntelliTrace. If you are not inclined to read his description here&rsquo;s a short one I whipped up:<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">IntelliTrace is a diagnostics tool for assessing program flow and tracing specific events throughout a programs&rsquo; execution, it aims to reduce the Mean Time to Bug Discovery (MTBD).<o:p></o:p></span></span></p>
<h2 style="MARGIN: 10pt 0in 0pt"><span style="COLOR: windowtext"><span style="font-size: medium;"><span style="font-family: Cambria;">How do I get IntelliTrace?<o:p></o:p></span></span></span></h2>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">IntelliTrace is included in the Visual Studio Ultimate SKU, the ability to collect IntelliTrace logs is also provided in the Test Elements SKU<o:p></o:p></span></span></p>
<h2 style="MARGIN: 10pt 0in 0pt"><span style="COLOR: windowtext"><span style="font-size: medium;"><span style="font-family: Cambria;">So how do I use this thing?<o:p></o:p></span></span></span></h2>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">You can use IntelliTrace through Visual Studio directly, or via the command line.<span style="mso-spacerun: yes">&nbsp; </span>These will be subjects of my upcoming posts!</span></span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>