Thursday, September 15, 2011

IntelliTrace In Production with VS11 CTP

Ok, so you've got your hands on the CTP of Visual Studio 11 that was released at the //build conference.  Cool.  Have fun with that, there's a ton to play around with!  More info here.

So where do you get the IntelliTrace cab file that was shown for the "IntelliTrace in Production" scenario?  Well, it's not exactly the most obvious but you can track it down in the following location once you've installed Visual Studio Ultimate CTP (note that this location is likely to change with upcoming releases).  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\TraceDebugger Tools

Once you have the IntelliTraceCollection.cab file you can take it to any other machine to leverage the IntelliTrace collection against IIS application pools without anything else!  No Visual Studio installation is required.

To extract the files in the cab be sure to use the expand command from the command line and don't just open the cab and extract the files.  The extract command from the command line maintains the file structure while using the extract command from Windows Explorer does not.  This is very important!

e.g. "expand /f:* IntelliTraceCollection.cab c:\IntelliTrace"  This will extract the files into a folder named IntelliTrace on the c: drive of the local computer.

Once you have the files extracted you are good to go with the PowerShell import and start collecting IntelliTrace against an application pool.

Note that you need to run your PowerShell as Administrator due to the stopping and starting of the application pool that is performed when the IntelliTrace profiler is started and stopped.  Once you have PowerShell running you add the IntelliTrace bits by running
Import-Module \Microsoft.VisualStudio.IntelliTrace.PowerShell.dll

Once that succeeds you can validate the import by executing "Get-Help IntelliTrace" in your PowerShell window to see the commands that are available.  Use Get-Help on any of the commands provided to get details on the usage.  Also watch Mark Groves and Tracey Trewin's Thursday afternoon session at //build to see advanced usage.

I would love to hear your responses and experiences with this feature.  More blog posts and official documentation will be forth coming.  Send me feedback at my Microsoft email address which is larrygug.

0 comments: