[MUSIC].
>> Hi, my name is Mark Downie I'm
a Program Manager on
the Visual Studio Production Diagnostics Team.
Today I'd like to talk to you about IntelliTrace.
One of the weaknesses of traditional or live debugging
is that it only understands your applications current state.
We have very limited data about past events.
To help you may decide to send login flow to the output window.
You either have to infer
these past events based on the applications current state,
or you could recreate these events
by rerunning your application over again,
but this tends to be really time consuming.
IntelliTrace is a Visual Studio Enterprise feature that expands on
the traditional notion of debugging
by recording specific events and data.
These events might include
module load activity or web requests or breakpoints.
IntelliTrace then lets you switch between
traditional or live debugging and IntelliTrace debugging,
allowing you to see what recorded information you
might have missed without forcing a restart.
Let's see this in action.
I have this ASP.NET application.
It is an open source application and I'm
going to use IntelliTrace to help me keep
track of very important events as I get deeper and
deeper into this debugging and diagnostics session.
I'm going to go ahead and hit "F5" and start debugging.
That will rebuild my application.
It will also start the application for me.
It will start running the application and load
a bunch of symbols so that I can debug correctly.
Before I start recreating the scenario,
I want to debug,
I'm going to go ahead and set some strategic breakpoints
that'll help me with my session here.
I'm going to go ahead and set a breakpoint here at line 69.
I'm interested in the whole action of going to
get comments for each of the posts here.
I'm going to hit "Control F12" which will
take me to definition of this method.
Yeah, I'm really interested in the data I pass to this method.
I'm interested in seeing post ID or comments.
Let's take a deeper actually passed those same values onto get
comments for hit "Control F12" on line 437.
Again, this is the same data being passed again.
I'm going to go ahead and pass over this.
I don't need a breakpoint here.
Control F12 here takes me to some interesting points here.
I'm interested in seeing what the data
I get back from this method here.
That's really interesting on line 1360
and certainly before I returned this method back,
I'm interested into seeing if actually even get any data here.
Let's go back to the way we started the blog post controller
because we'll be making our way back to the top of the call stack.
I'm certainly very interested
in if I have any blog posts and taking a quick review there.
I'm going to go ahead and recreate the scenario I'm debugging.
Hopefully that'll mean I hit
a breakpoint perfect at my breakpoint.
Now this opportunity, obviously I can review some data here,
and yeah everything seems to be working as I would assume,
I can check values and variables that have
been passed in at this moment.
I can check everything that's
typically what I would expect at a breakpoint.
Fantastic. Let's keep going as we hit 'Continue'.
We hit our next breakpoints,
which I strategically put in another method here and
I can check the values being passed again heating "Continue".
Again typical of what I'd expect,
I can take the date which is back in February of 2020.
Perfect I can go here and see
exactly what information I returned for comments I got
zero there and hit "Continue" again.
Now this is only just five.
I've only hit five breakpoints,
but you can imagine sometimes you get several layers deep here.
You can decide at this moment you'll notice right at the top,
what's lit up here are a couple of additional icons.
Now these are the IntelliTrace, step back icons,
which essentially say to you,
you have the opportunity to go back in time.
I'm going to go ahead and hit the "ALT,
Open Brackets", which is the step back shortcut.
You'll see now I've changed slightly Visual Studios,
change the top part.
Now he's describing the I'm in historical debugging mode.
It's saying that there are participating windows that
are also historical debugging for me.
It's also giving me the opportunity to
return to live debugging at any moment.
If I look at the bottom here,
I've got autos in historical debugging.
I've got Watch in historical debugging,
so I can potentially add things.
They've got locals in historical debugging,
and my Call Stack is also historical debugging.
Instead of assuming I'm in my controller and interaction,
it now sees that the last time I was in this moment,
I was actually in internal get comments,
which is the top of the call stack,
which corresponds currently to the method I'm in.
I can take another step back.
I can hit "ALT Open Square Brackets"
again and take another step back.
I get to see now
the context of the moment I was at this breakpoint.
Now notice I've still got this value
because obviously that would have been executed,
forget date for entry on line 1359.
However, after this or these
values are all null because again, there hasn't executed.
IntelliTrace has taken the snapshot at this moment in time and
associated it correctly with the line
I was at when the snapshot was taken.
I can keep going back to these moments that are important to me.
Again, going back to get comments,
I can see the values that were passed in at
the strategic moments that were important to my debugging session.
Now I no longer have to remember all the details about
every single moment that led to
the era or the problem that I'm investigating.
I can use breakpoints not only as pausing moments,
but as moments of collecting data
that might be helpful to me later down the line.
I can continue to go back in time at this moment.
Or I can return to my live debugging,
which means I'm going to basically
continue with what is traditional live debugging.
I'm now back to the yellow highlighted
line saying that this is the next line to be executed.
What is also really important is that you can
use the diagnostics tool
Windows to pick any of these previous breakpoint moments.
If these previous break and step moments
that allows me to hydrates on past historical moment.
You can go to the debug menu item Windows,
and Show Diagnostics Tool.
This opens up the diagnostics tool.
If you look at the events,
you will see a series of
these snapshots that I've taken at each of these breakpoints.
I can choose to activate any one of
those by simply selecting and clicking "Activate".
I can go back to a specific historical moments
in time that I know that's important to my current debugging.
Today I was able to demonstrate how IntelliTrace is able to help
Visual Studio Enterprise users
expand on the traditional notion of debugging.
IntelliTrace step back can save you time
when you want to see the previous application state,
but want to forgot that dozens of restarts necessary to
get your app back into
the desired state. Thanks for joining today.