hey friends I'm Scott Hanselman now the
folks at Visual Studio calm said that
y'all wanted to see how I use Visual
Studio I'm not really sure why that
would be interesting but I figured it
couldn't hurt so I put together a small
video here now you're looking at one of
my monitors I've got three 4k monitors
that are kind of across each other but
I'm doing this one enough on a lower
resolution Center monitor so you'll have
to bear with me now I've got a number of
visual studios actually on my machine if
I type in Visual Studio here in the
Start menu you'll see a couple things
business video code new icon Visual
Studio 2019 Visual Studio 2017 from
before notice the green icon here from
Visual Studio code insiders that's a of
a daily build and then if I go to
official studio 2019 I actually have two
visual Studios install they've got an
internal preview and Visual Studio 2019
itself that's really cool because you
can run these things side by side I I
can install uninstall update these and
if one doesn't work I can use another
one because it might not be like this is
internal and that one's more stable so
that's cool so if I go and say something
like 2019 and launch that starts up
right away and shows you the recent
stuff I could go and open a folder or
even you know clone directly from github
which is kind of cool I've got my
podcast that I'm working on I'm porting
this is about a 15 or 16 year old app
that I'm porting this is an old webforms
app so there's different things that I'm
doing here if I go and look at Hanselman
its core no I see yeah this is my
podcast site so this one is for my
podcast here I'll bring up I'm using
edge a canary version of edge so here's
my podcast called Hansel minute so this
this website here is done in asp.net
core and hosted on Azure it's a real
website that I really care about and if
I go to dev dot-com I've got my main
website and I've got my handsome in its
web site and the pipeline that I can go
and manage that so here I'm updating and
then releasing that out to production so
that's here in Visual Studio 2019 now
I'm using live unit testing which is
pretty cool so here I turn that on and
you'll notice on the left hand side here
things
being covered by tests as I write code
like so as I make a change to some code
we said I changed that to like no see
how these all changed I'm gonna keep
writing code and doing stuff look I just
broke broke a test it's just while
typing I didn't compile I didn't do
anything I didn't even save look at the
little star there
I didn't even save this you'd
automatically notice that that was
breaking a test I'll go ahead and go
back and undo that I want to make sure
that that does not break test as I'm
going around and working on my index
pages I can see coverage as I move
through all of my things so that's live
unit testing I've got about 19 tests
join I've actually got more tests than
that actually got 23 tests some of these
tests use a thing called selenium which
automates my browser and let me look at
not unit tests per se but full
integration test so here I am launching
selenium which is going to go and launch
Chrome and you'll notice in a second it
says chrome is being controlled by
automated test software I could also
launch edge or Firefox and that's going
to go and talk to my actual back-end so
this is more of a or a smoke test you'll
notice that I've got 23 tests here in my
test explorer but I've only got 19 in my
regular tests that's because four of
these are these smoke tests and I really
don't feel like I should run those
during live you know testing is I have
chrome popping up all the time plus it
doesn't really make sense I want my live
unit test to go fast fast fast fast fast
so what I can actually do here let's see
if any of these fail looks like one of
them failed I can actually see oh I've
got a carriage return line feed here
when I should not or at least I didn't
expect one so I either need to fix the
test and what it's expected or maybe fix
something else but I want to point out
that some of these are are skippable
facts meaning that they are tests that
don't need to run I don't want to run
things if I'm in docker or in a build
server so I have a little check for that
and I also want to make sure that my
live unit testing
live unit is not something that there we
go look at that that one of the traits
of this test is that you skip it
when live unit testing so 19 tests here
23 tests here and I could go in there
and potentially fix that one if I felt
like it I can go up here and let's go
ahead and actually go there and then
check out the web browser you can see I
can have Firefox Chrome adds canary pick
those and then go ahead and start and go
and debug my application see my nice big
green cool Mouse there I'm all about the
giant mouse you can go and start menu
and type in mouse cursor and make that
really big or rainbowy or whatever it
makes you happy okay this is going to go
and launch my site yeah see look at that
there so that's interesting I can go and
maybe debug a particular issue in the
edge browser to find out why this is not
working it's actually a security thing
and then one of the things that I like
about Visual Studio 2019 is this process
memory and all of my events that
occurred so I could see my caching
starting up you can see calls to
different parts of my application if I
want to catch output anything that's
done in my logging I can also take a
snapshot see and then go and dig into
what's happening in my memory right now
well look at that it turns out that I
actually have almost 700 episodes of my
podcast so you'll notice that about a
megabyte of memories being used up you
might think yourself why are you doing
that Scott well I don't wanna hit the
database all the time so in fact I've
got instances instances look of V to
show right let's look at my extension
then I hit extensions manage extensions
and see what I got here I've got live
share which lets me go and share my code
but not my pixels with folks I use the
cloud Explorer sometimes original studio
20 19 that lets me go and see what's
going on in Azure because this
application lives in Azure so for
example I can go over here
click on cloud Explorer now I have my
work account which I don't really use
and I have at my personal account this
one's my personal right here I think I
might want to actually filter these out
because I really only care about my
visual studio MSDN account so I'll turn
these all off hit apply so now I'm just
gonna see there we go my local resources
and my app services I can see the apps
service plans that I've got for my blog
and for my podcast I've got a Linux one
ok Windows one here is one of the blogs
there's the main page
here's Hansel minutes itself what's cool
about this is notice that I'm not even
in the Azure portal I can actually click
files upload a file search files or
directly see look what's deployed which
is really cool so I can right click and
deploy I can also go here and see log
files and then do log streaming if I
wanted to but if I wanted to see
specific event logs or specific errors
just double click on them they'll
download them and put them inside of
Visual Studio for you which is pretty
sweet I tend to use big fonts I think in
this case I'm using with sit a console I
also like to control scroll a lot I
don't think that visual studio is gonna
say that I have any major issues I'm
noticing here in the health area that I
don't think I have any code that it
calls out but I could potentially do
something like a refactoring here and
right click and say remove removing sort
musings so that's my visual studio not
super fancy pretty straightforward kind
of a stock version of Visual Studio but
it makes me happy be sure to send me
your Visual Studio semi a screenshot do
you have interesting fonts have you
changed the custom colors what
extensions do you have going at me on
Twitter s Hanselman and maybe going at
visual studio as well thanks
Wednesday, February 4, 2026
Code Like Scott
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment