dev390 - intellitrace®, what is it and how can i use it to my benefits? marcel de vries technology...
TRANSCRIPT
DEV390 - Intellitrace®, What Is It and How Can I Use It To My Benefits?Marcel de VriesTechnology Manager Microsoft Application DevelopmentInfo Support
Intellitrace®, what is it?
Analogy with aviation industryHow do you reproduce a airplane crash?
This is a difficult problem to solve and they found a solutionBlack box
All relevant voice information from cockpitAll relevant telemetry
Intellitrace® is kind of similar for your Managed programs
Works for .NET 2.0 and up
Intellitrace®
Intellitrace® provides a debug logfile that you can use to debug your program at a different moment in timeLogfile contains Events
Debug eventsExeption events.NET framework events
Can be configured what is relevant for your application
Configuration
Log can also contain call informationIntellitrace® collects a record of each call entry and exit. On entry, Intellitrace® collects name and value information for each parameter. For arrays, only the first 256 objects are recorded. For objects, only the top level of the structure is recorded. On exit, Intellitrace® collects the return value of the method.
Has more impact on application performance!
Configure Intellitrace® in Visual Studio 2010
Tools -> Options -> Intellitrace -> Intellitrace events
So what is captured when all turned on?
private void btnCalcTip_Click(object sender, RoutedEventArgs e){
string country = cmbCountries.SelectedItem.ToString();double billAmount = Double.Parse(txtBillAmount.Text, CultureInfo.CurrentCulture); string qualityOfService = GetQualityOfServiceString();
int numCourses = GetNumberOfCourses();int numberOfFlies = 0;
numberOfFlies = GetNumberOfFlies(); // calculate tipdouble tip = tipCalcBl.CalculateTip(country, billAmount, qualityOfService, numCourses, numberOfFlies);
}
Intellitrace® event, Gesture
WPF
Nothing here, .NET FW
code excluded by default
Nothing here, .NET FW
code excluded by default
Return value of method
Return value of method + value of all argument
Return value of method Return value of
method
Local assignement of primitive not captured
What about objects that are passed between methods?
Only primitives within the object are capturedPointers to other objects
Only capture if there was a pointer or nullShows as “unavailable” in locals windows
Address
string Streetstring Citystring Statestring Zip
IEnumerable<Phone>
IEnumerator <T>
Employee
int IDstring FirstNamestring LastNamestring Identitystring ServiceAreas
Data that is collected
So we know there was an Address, but not it’s contained values
There was no phone (null)
demo
Marcel de VriesTechnology Manager Microsoft Application DevelopmentInfo Support
Using Intellitrace® in Visual studio and in your builds
Team build and Symbols
Symbols are extremely important when you use Intellitrace® from other environments
Log collected on test or production machineDebugging with logfile on your VS machine
Needs to find the sources that are used for that particular build
Symbols contain information what code file is the source of a binary
Better known as PDB filesAlways compile your products with symbols
Does not incur performance penalties!
Symbols and Team BuildTeam Foundation Server build provides the option to save the symbols to a symbol server
Indexes all sources so they can be found based on your binarySymbol server setup is nothing more then providing a share
Symbols and visual Studio
Set visual studio to enable symbol server supportTools -> Options ->Debugging -> General
Symbols and visual Studio
Set Visual Studio to include your symbol serverTools -> Options ->Debugging -> Symbols
demo
Marcel de VriesTechnology Manager Microsoft Application DevelopmentInfo Support
Enable Intellitrace® for your testers and configure symbols
Intellitrace® everywhere
With Visual Studio 2012 production use of Intellitrace® is now enabled
Free download, anyone can capture the logs anywhereDownload the Intellitrace® collector for visual Studio 2012 installer
http://www.microsoft.com/visualstudio/11/en-us/downloads#Intellitrace®-collectorZero footprint install on serversSupported platforms:
Windows Server 2008 R2, Windows Server 2012 Release CandidateWindows 7, Windows 8 Release Preview
demo
Marcel de VriesTechnology Manager Microsoft Application DevelopmentInfo Support
Intellitrace® in production scenario’s
It is possible to ad your own events
Tunes Intellitrace® to your specific needsSpeeds startup timeReduces runtime overhead, since you can collect only from your own module
Announced feature at TechEd North AmericaMenu option to add a custom Intellitrace® event just by right click in your source code in VS2012 Post RTM
Also possible in 2010Edit the DefaultCollectionPlan.xml in VS directory
Add custom events to the CollectionPlan.xml<?xml version="1.0" encoding="utf-8"?>
<CollectionPlan xmlns="urn:schemas-microsoft-com:visualstudio:tracelog"> <TracePointProvider> <Categories>
<Category Id="TipCalculator" locID="category.TipCalculator">Tipcalculator events</Category>
</Categories> <ModuleSpecifications> <ModuleSpecification Id="Intellitrace-demo">
TipCalculatorBL.dll </ModuleSpecification> </ModuleSpecifications>
Your category name
Your assembly that contains the operations you want to
trace
Module specification
reference needed later
Add custom events to the CollectionPlan.xml<DiagnosticEventSpecifications>
<DiagnosticEventSpecification enabled="true"><CategoryId>TipCalculator</CategoryId> <SettingsName _locID="uniqueName">Calculate Tip</SettingsName> <SettingsDescription _locID="uniqueName">
this is the more verbose description shown in the config dialog </SettingsDescription>
<Bindings><Binding>
</Binding></Bindings>
</DiagnosticEventSpecification></DiagnosticEventSpecifications>
<Binding/> section
<ModuleSpecificationId>Intellitrace-demo</ModuleSpecificationId><TypeName>TipBusinessLayer.TipCalculatorBL</TypeName><MethodName>CalculateTip</MethodName>
<MethodId>TipBusinessLayer.TipCalculatorBL.CalculateTip(System.String,System.Double,System.String,System.Int32,System.Int32):System.Double</MethodId> Full Method Signature
Namespace
Class name
Method in that class
Refers back to Module specification
<Binding/> section<ShortDescription _locID="uniqueID">CalcualteTip({0},{1},{2},{3},{4})</ShortDescription><LongDescription _locID="uniqueID">Tip calcualtion executed (country={0},billAmount={1},qualityOfService={2},numberOfCourses={3},numberOfFlies={4})</LongDescription>
<DataQueries><DataQuery index="1" maxSize="20" type="String" name="country" _locID="uniqueID" /></DataQueries>
Param index, for static methods starts at 0, instance methods
starts at 1
Name of the parameter
Only required for string
demo
Marcel de VriesTechnology Manager Microsoft Application DevelopmentInfo Support
Tuning the Intellitrace® collection plan for your custom libraries
Evaluations
http://europe.msteched.com/sessions
Submit your evals online
Related Content
Breakout Sessions
FDN02 Application Lifecycle Management (ALM): It’s a Team Sport
DEV321 Continuous Feedback in Agile Teams
DEV344 Developer Collaboration with Visual Studio 2012
DEV346 All Aboard the Team Foundation Server Express
DEV212 Implementing Scrum Using Team Foundation Server 2012
DEV316 Application Lifecycle Management Tools for C++ in Visual Studio 2012
AAP309 Making Agile Estimation Work
DEV263 Dev-Ops Best Practices On The Microsoft Stack
DEV214 Introducing the New Visual Studio 2012 Unit Testing Experience
DEV337 Software Testing with Microsoft Test Manager 2012 and Lab Management
DEV370 Automating Server-Based Build, QA and Test with Visual Studio 2012
Related Content
Breakout Sessions
DEV362 From Development to Production: Optimizing For Continuous Delivery
DEV310 Continuous Delivery of Windows Azure Cloud Apps
DEV318 Working on an Agile Team with Visual Studio 2012
DEV390 IntelliTrace, What Is It and How Can I Use It To My Benefits
DEV217 Deep Dive Into Team Foundation Server 2012 Agile Management Tools
DEV345 The Accidental Team Foundation Server Admin
AAP401 Real World Developer Testing with Visual Studio 2012
DEV340 Taking ALM to the Cloud with the Team Foundation Service
DEV317 Going Beyond F11: Debug Better and Faster with Visual Studio 2012
DEV312 Create Robust, Maintainable Coded UI Tests with Visual Studio 2012
DEV411 Testing Un-Testable Code with Fake in Visual Studio 2012
Related Content
Breakout Sessions
DEV324 A Modern Architecture Review: Using the New Code Review Tools
DEV412 Identify & Fix Performance Problems with Visual Studio 2012 Ultimate
Hands-on Labs (session codes and titles)
DEV11-HOL
Agile Project Management in Team Foundation Server 2012
DEV12-HOL
Build the Right Software and Collaborate Effectively Using Storyboarding and Feedback Tools in Visual Studio 2012
DEV13-HOL
Using IntelliTrace with Production Systems to Quickly Diagnose and Fix Issues
DEV16-HOL
Learn How Microsoft Test Manager 2012 Will Embrace an Exploratory Testing Approach
DEV17-HOL
Explore the New Unit Testing and Code Clone Capabilities of Visual Studio 2012
DEV19-HOL
Discover How the New Features of Team Foundation Server 2012 Can Improve Collaboration in Your Development Team
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.