20
saturday 2017 HISTORICAL DEBUGGING WITH INTELLITRACE IN VISUAL STUDIO Mirco Vanini

VS2017 saturday - Historical debugging with intelli trace in visual studio

Embed Size (px)

Citation preview

Page 1: VS2017 saturday - Historical debugging with intelli trace in visual studio

saturday 2017

HISTORICAL DEBUGGINGWITHINTELLITRACE INVISUALSTUDIO MircoVanini

Page 2: VS2017 saturday - Historical debugging with intelli trace in visual studio

AGENDA

Debuggingwithandwithout IntelliTrace

What is IntelliTrace ?(andwhat it candoforyou)

Why debug withIntelliTrace?

DebuggingwithIntelliTracedeepdive

Page 3: VS2017 saturday - Historical debugging with intelli trace in visual studio

BEMOREPRODUCTIVE DURINGYOUR DAILY DEBUGGINGYouareaskedtofixabug:

- forapartoftheappyoudidn’twrite- ORthattakesalotofsteps/timetoreproduce- ORafterjoininganewteamorproject- ORforanapplicationyouwroteawhileago- ORthatisnoteasytoreproduceonadevmachine- ORthatyoudon’tknowexactlyhowtoreproduce

ORyousimplynoticeunexpectedbehavior

Page 4: VS2017 saturday - Historical debugging with intelli trace in visual studio

DEBUGGINGWITHANDWITHOUT INTELLITRACE DEMO

Page 5: VS2017 saturday - Historical debugging with intelli trace in visual studio

WHAT IS INTELLITRACE ?

IntelliTraceisaVisualStudioUltimatefeaturethatimprovesdeveloperproductivityduringdebugging

“HistoricalDebugging”

Trackseventsandmethodcallinformationatruntime

Recordsstacktrace,localvariables,andcustominformationforeachevent

Page 6: VS2017 saturday - Historical debugging with intelli trace in visual studio

VS2017SUPPORTS

Page 7: VS2017 saturday - Historical debugging with intelli trace in visual studio

WHAT CANINTELLITRACE DO?

Applicationisrunning

Debuggingstarted

FileAccess:Readingconfig files

Gesture:Button“Open”clicked

ADO.NET:“SELECT*FROMCustomer”was

executed

Exception:Exception“ArgumentNullException”

wasthrown

Page 8: VS2017 saturday - Historical debugging with intelli trace in visual studio

HOWINTELLITRACE SAVES MEDEBUGGING TIME

Typically,withoutIntelliTrace:­ Firstthoughtis“wheretoplaceabreakpoint?”­ Repeattestingstepswitheveryfailedattempt­ Keepsettingbreakpointstofindrootcause

WithIntelliTrace:­ Firstthoughtis“whathasIntelliTracecollected?”­ Identifyrootcauseimmediatelyoratleasteliminatepotentialscenarios

­ Overalllesstimespentinvestigating

Page 9: VS2017 saturday - Historical debugging with intelli trace in visual studio

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.

Page 10: VS2017 saturday - Historical debugging with intelli trace in visual studio

INTELLITRACE EXPERIENCES

Traditionalor live debuggingshowsonlyyourapplication'scurrentstate,withlimiteddataaboutpastevents

IntelliTraceexpandsthistraditionaldebuggingexperiencebyrecordingspecificeventsanddataatthesepointsintime

F5DebuggingLivedebuggingfromVisualStudio,unittests,andotherdeveloperexperiences

ProductionDebuggingCollectiononproductionsystemsforlateranalysisonadevelopmentmachine

Page 11: VS2017 saturday - Historical debugging with intelli trace in visual studio

COLLECTIONMODES

Lowimpact(eventsonly)InterestingruntimeeventsarecollectedLowoverheadifcollectinglow-frequencyevents

Highimpact(eventsandcallinformation)

EverymethodcalliscollectedUpto10xpotentialslowdownConfigureforspecificmodulesonlytoreduceimpact

Page 12: VS2017 saturday - Historical debugging with intelli trace in visual studio

ADVANCED

StoreIntelliTracerecordingLimitthesizeNavigationgutter

TFSSymbollookup

Page 13: VS2017 saturday - Historical debugging with intelli trace in visual studio

EVENTS

WCF,ADO.NET,fileaccess,registryaccess,ASP.NET,andmyriadsofotherevents

Cancustomizewithyourownevents

Page 14: VS2017 saturday - Historical debugging with intelli trace in visual studio

MODULES

BydefaultIntelliTracerecordsinformationforallthemodulesusedbyyoursolution

YoucanspecifythemodulestoincludeorthemodulestoexcludefromIntelliTrace

Page 15: VS2017 saturday - Historical debugging with intelli trace in visual studio

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]);}

Page 16: VS2017 saturday - Historical debugging with intelli trace in visual studio

EVENTSTIMELINE

BreakEventstrack: Thistrackshowseventsthatstoppedtheexecutionoftheapplication,suchasbreakpointsbeinghit,steps,the“BreakAll”pausebuttonatthetopbeingclicked, Debugger.Break()codestatements andbreakingexceptions

IntelliTraceEventstrack: ThistrackshowsalltheothereventscollectedbyIntelliTracethatarenotbreakevents,suchasSQLqueriesbeingexecution,programoutput,ASP.NETwebrequests,fileaccess,registryaccess,gestures,andsoon

Page 17: VS2017 saturday - Historical debugging with intelli trace in visual studio

EVENTSDETAILS

Event: TheshortdescriptionoftheeventthathasbeencollectedTime: Thenumberofsecondsofapplicationruntimethathadelapsedwhentheeventwascollected.Duration: Thedurationoftheevent,inmillisecondsThread: ThenameorIDofthethreadthatwasresponsibleforgeneratingtheevent

Page 18: VS2017 saturday - Historical debugging with intelli trace in visual studio

DEBUGGINGWITHINTELLITRACEDEEPDIVE DEMO

Page 19: VS2017 saturday - Historical debugging with intelli trace in visual studio

WRAP-UPThingswecovered:

Newuserexperience(DiagnosticTools)

Improveddebuggingworkflow

Reducedbuginvestigationtime

Abilitytodetectunexpectedbehavior

Otherthingsyoucouldexplore:

IntelliTraceStandaloneCollector

IntegrationwithMicrosoftTestManager

IntegrationwithMicrosoftMonitoringAgent

Page 20: VS2017 saturday - Historical debugging with intelli trace in visual studio

WHO IAMMircoVaniniMicrosoft®MVPWindowsDevelopmentAllSeen Alliance- AllJoyn®AmbassadorOpenConnectivityFoundation- OCF®Ambassador

www.adamfactory.com

[email protected]

@MircoVanini

TinyCLR.it