Upload
mirco-vanini
View
110
Download
4
Embed Size (px)
Citation preview
saturday 2017
HISTORICAL DEBUGGINGWITHINTELLITRACE INVISUALSTUDIO MircoVanini
AGENDA
Debuggingwithandwithout IntelliTrace
What is IntelliTrace ?(andwhat it candoforyou)
Why debug withIntelliTrace?
DebuggingwithIntelliTracedeepdive
BEMOREPRODUCTIVE DURINGYOUR DAILY DEBUGGINGYouareaskedtofixabug:
- forapartoftheappyoudidn’twrite- ORthattakesalotofsteps/timetoreproduce- ORafterjoininganewteamorproject- ORforanapplicationyouwroteawhileago- ORthatisnoteasytoreproduceonadevmachine- ORthatyoudon’tknowexactlyhowtoreproduce
ORyousimplynoticeunexpectedbehavior
DEBUGGINGWITHANDWITHOUT INTELLITRACE DEMO
WHAT IS INTELLITRACE ?
IntelliTraceisaVisualStudioUltimatefeaturethatimprovesdeveloperproductivityduringdebugging
“HistoricalDebugging”
Trackseventsandmethodcallinformationatruntime
Recordsstacktrace,localvariables,andcustominformationforeachevent
VS2017SUPPORTS
WHAT CANINTELLITRACE DO?
Applicationisrunning
Debuggingstarted
FileAccess:Readingconfig files
Gesture:Button“Open”clicked
ADO.NET:“SELECT*FROMCustomer”was
executed
Exception:Exception“ArgumentNullException”
wasthrown
HOWINTELLITRACE SAVES MEDEBUGGING TIME
Typically,withoutIntelliTrace: Firstthoughtis“wheretoplaceabreakpoint?” Repeattestingstepswitheveryfailedattempt Keepsettingbreakpointstofindrootcause
WithIntelliTrace: Firstthoughtis“whathasIntelliTracecollected?” Identifyrootcauseimmediatelyoratleasteliminatepotentialscenarios
Overalllesstimespentinvestigating
WHATAPPSCANIDEBUGWITHINTELLITRACE?SupportedVisualBasicandVisualC#applicationsthatuse.NETFramework2.0orhigherversions.Youcandebugmostapplications,includingASP.NET,MicrosoftAzure,WindowsForms,WCF,WPF,WindowsWorkflow,SharePoint2010,SharePoint2013,and64-bitapps
LimitedsupportF#appsonanexperimentalbasis;WindowsStoreappssupportedforeventsonly,callinformationisnotcurrentlyavailablefor.NETCoreapps
NotsupportedC/C++,scriptlanguages;WindowsServices,Silverlight,Xbox,orWindowsMobileapps.
INTELLITRACE EXPERIENCES
Traditionalor live debuggingshowsonlyyourapplication'scurrentstate,withlimiteddataaboutpastevents
IntelliTraceexpandsthistraditionaldebuggingexperiencebyrecordingspecificeventsanddataatthesepointsintime
F5DebuggingLivedebuggingfromVisualStudio,unittests,andotherdeveloperexperiences
ProductionDebuggingCollectiononproductionsystemsforlateranalysisonadevelopmentmachine
COLLECTIONMODES
Lowimpact(eventsonly)InterestingruntimeeventsarecollectedLowoverheadifcollectinglow-frequencyevents
Highimpact(eventsandcallinformation)
EverymethodcalliscollectedUpto10xpotentialslowdownConfigureforspecificmodulesonlytoreduceimpact
ADVANCED
StoreIntelliTracerecordingLimitthesizeNavigationgutter
TFSSymbollookup
EVENTS
WCF,ADO.NET,fileaccess,registryaccess,ASP.NET,andmyriadsofotherevents
Cancustomizewithyourownevents
MODULES
BydefaultIntelliTracerecordsinformationforallthemodulesusedbyyoursolution
YoucanspecifythemodulestoincludeorthemodulestoexcludefromIntelliTrace
WHAT EXACTLY IS COLLECTED?
ParametersReturnvaluesReferencetypelocalsForeachreferencedobject,whetherornotitwasthere,butnotitscontents
void ReadTweets(string account){
var tweets = GetTweets(account);int count = 3;for (int i = 0; i < count; ++i)
DisplayTweet(tweets[i]);}
EVENTSTIMELINE
BreakEventstrack: Thistrackshowseventsthatstoppedtheexecutionoftheapplication,suchasbreakpointsbeinghit,steps,the“BreakAll”pausebuttonatthetopbeingclicked, Debugger.Break()codestatements andbreakingexceptions
IntelliTraceEventstrack: ThistrackshowsalltheothereventscollectedbyIntelliTracethatarenotbreakevents,suchasSQLqueriesbeingexecution,programoutput,ASP.NETwebrequests,fileaccess,registryaccess,gestures,andsoon
EVENTSDETAILS
Event: TheshortdescriptionoftheeventthathasbeencollectedTime: Thenumberofsecondsofapplicationruntimethathadelapsedwhentheeventwascollected.Duration: Thedurationoftheevent,inmillisecondsThread: ThenameorIDofthethreadthatwasresponsibleforgeneratingtheevent
DEBUGGINGWITHINTELLITRACEDEEPDIVE DEMO
WRAP-UPThingswecovered:
Newuserexperience(DiagnosticTools)
Improveddebuggingworkflow
Reducedbuginvestigationtime
Abilitytodetectunexpectedbehavior
Otherthingsyoucouldexplore:
IntelliTraceStandaloneCollector
IntegrationwithMicrosoftTestManager
IntegrationwithMicrosoftMonitoringAgent
WHO IAMMircoVaniniMicrosoft®MVPWindowsDevelopmentAllSeen Alliance- AllJoyn®AmbassadorOpenConnectivityFoundation- OCF®Ambassador
www.adamfactory.com
@MircoVanini
TinyCLR.it