[MUSIC].
>> This is a Data tip and that was that thing
that I was doing where I was hovering over a variable
and you'll notice this dropdown that comes up.
This is a really quick way of identifying what the value
of a particular variable is while you're debugging your code.
Let's see, hover over something.
Done.
If I hovered over Neutral books,
for instance, it's filled up,
I can expand it out
and see everything that's being stored in that list.
The pen here represents a data tip that I decided to pin.
Because one of the annoyances that comes with data tips
is once you have rough off of it, it'll disappear.
If you want to keep it around for a bit longer,
then you can hover over and get the data tip
and then pin it and you can drag it wherever.
This data tip will exist
for as long as you decide to keep it there.
If you chose to exit your debugging session,
it'll still be there
and it'll only disappear when you choose to delete it.
>> Okay. Then I really dig that
you can just mouse over whatever it is
and then it will just pop up and allow you to start digging
into different parts of it.
Are there any cool things that you can do?
Because I know you showed off
the ability to pin a property so that way I can see that.
Are there any other cool things that I can do with that?
Or is it really more about being able to go in
and just like see values and inspect it?
>> Really that's more of an inspection tool
and it's supposed to make inspection quicker,
but there are some things that you can use alongside those pen,
so we have multiple pens here.
One of the things you can do if you wanted
to show the property names,
for instance, then you can choose to display those or not.
Also, my personal favorite is if you only care
about whichever properties that you pinned,
you don't care about this long list of properties,
then you can just filter out
all the properties that aren't pinned.
This can save you some time if you're just
interested in inspecting a particular property or tool.
Personally, I like to use this alongside
the search tool in my Locals Autos and Watch windows.
All of these are great inspection tools
for examining your variables.
One of the quirks that comes
with searching for variables and your Windows like this
is that we basically had to create a stopping point for
how deep is this search going to navigate
in order to find whatever keyword you're looking for.
Because otherwise, depending on
what crazy variable you created or what crazy tree you created,
it could go on forever.
We don't want that so that's why
we have this search step stopper here.
With search app, you're trading up larger depth over performance.
If you make it higher,
it's going to search more thoroughly but at the cost
of it's going to take a longer time to find results,
and then the opposite is obviously the case too.
Usually, you can set your search depth
lower when you filter your properties.
I like this because there's less things
for Visual Studio to search,
which I know we're all about performance.
If you want to save some performance time
and you'd like to search through your variables,
definitely consider pinning properties
that you care about and searching for them that way.
It offer something like that.
>> Is it just searching property and variable names
or can I also search values when I'm doing that?
>> Yeah, you can search for values as well
when you think of a book that was in here.
This is the Media pin properties.
Look at this.
Let's say I'm looking for visible, here you go.
Also it'll give me the results
that are in the expanded version as well.
The search step that's within range.
Yeah, I can search for values,
I can search for type, I believed too.
Let's say String, it says sting.
Not the singer.
You can search for type, value, and name.
>> That's cool.
I did that. Okay.
Now you also highlighted the Watch window and the Autos window.
What do those do?
>> Yeah. These are all very similar.
This one to explain is the Local's window.
I think the Locals window will give you all of the variables
that are within the scope of where you are currently at.
I've hit this breakpoint that's at the end of this function
so it's giving me some of the relevant variables
that are at that given point.
We have the Watch window,
which lets you type in
whatever specific variables that you want to look at.
Maybe the Local's window might be too busy for you
depending on how much you have going on in your program.
I said I wanted to see neutral books,
then I could get some more results in that way.
Again, I can inspect my variables the same way.
Both and all three of these windows but the Watch window
lets me choose which variables I care about the most.
Then Autos window is honestly really hard to describe.
I think it's really just an instance of an Inspection window
that will take the variables that are within the last three
and the first three lines of
where your execution pointer is at that given point of time. Yeah.
>> I'm guessing based on that,
you don't find yourself using
the Autos window all that frequently?
>> I don't personally,
I usually use Locals a lot and I use Watch.
What's cool about the Watch window
especially other than just being able to pick
what is getting displayed
specifically is that you can
use these things called format specifiers,
which let you get a little more nuanced than
how one of these variables
is going to get displayed in the Watch window.
For instance, let's say I want to get neutral books.
Wherever the first open there is up.
We'll see, let's try to pick a good example.
I'm blanking on a good example.
>> No, that's fine. No worries. That's fine.
>> Yeah. Format specifiers, they're really cool app.
There's actually an example up here.
It's just not in range right now,
but know there's this comma nq thing.
Nq stands for no quotes in this case.
If I had a string variable where
I didn't want to see the quotation marks
around it for whatever reason,
I could just use comma no quotes,
and then it would show the value
without the quotation marks
and other things you could have
like an end value and maybe you want to
display it as a hex number and not as decimal number,
then you can use comma H.
Little things like that.
The beauty about it is you can use commas.
If you're not familiar with those format specifiers, which again,
these are not very discoverable at first glance,
then you can do comma, and it'll give you
a list of different ones that you can use.
Here's a decimal integer there's a hexadecimal integer, no quote,
as I mentioned, we've got lots of different ones and they change
and vary depending on the language that you're using.
If you're writing something in C++ then
the different format specifiers you get will be
you need to C++ and stuff like that.