- [Narrator] With our little visit counter in place,
let's use the debugger to inspect
what's actually going on in our request.session object.
For that, I want to set a break point on line 38.
You do that by simply moving the mouse
to the spot left of the line number
and then click on it so we have a break point.
Now, here, and I start the debugger.
And I head over to the website and just load
the page once.
If we now hover over request session,
we see that we already have a session object here
that holds the cookie, it holds the session ID
and also the properties that we set before.
And now let's use the debugger to step over
to the next line of code and if we now hover over
the session object, we already see
that there is also now this visits property set.
So let's stop the debugger now
and remove the break point and I will now simply start
the application and I will reload
it a few more times.
And to see what actually now happened
on the database I head over to MongoDB Atlas
and now when we refresh our list of collections,
we should see a new collection sessions.
When I click on that, we see that
there is now a new document that represents
the current session we created.
So it has a session ID, it has expiration date,
and also a session property
and if we look into that a little bit closer,
we see that there is a property visits set
and it have the value of 3.
So far, so good.
Let's head back to the code
and there I will remove this visit com,
we don't need it anymore.
Until now, we can manage sessions
but we have no functionality to actually authenticate
the user in place.
We will cover that in the next videos.