in this video we're going to convert a
vs code color theme to visual studio in
a few easy
steps we start in vs code by making sure
that the theme we want to export is also
the one that's
active then using the command pallet
we're going to invoke the command for
generating a color theme from the
current
settings that will generate a huge Json
file with all the color Tok tokens from
the theme so all we have to do now is to
save it on
disk back in Visual Studio 20122 we're
going to create a new extension project
I'm going to search for V6 and select
the empty V6 project
template let's call this project my
theme in the project I can now add an
existing item and in the dialogue select
to show all files so we can see the new
Json C file that we exported from vs
code
that brings it into my project and I can
now right click and say convert to
visual studio
theme it will produce a code behind file
a package St this is the visual studio
theme file format and all I have to do
now is to register it with the V6
manifest so I'm going to open that file
and click the assets Tab and select a
new vs package then point to a file on
the file system and notice how it
already suggest the package that file
that was generated for
me I can now test by hitting F5 to open
a new instance of Visual
Studio when I go to the tools menu I
should be able to see my new theme show
up and clicking that will select it and
show it right
here this works for any vs code color
theme all you have to do is to install
the vs code theme converter extension
into Visual Studio that enables the
conversion of the Json C color theme
file into the package def
file this is what makes it all so easy
you can get that extension for free at
the visual studio Marketplace
Wednesday, February 4, 2026
Convert VS Code themes to Visual Studio
Conversations on AI with customers Emerging Trends
The direction we’re going in is, we just have this integrated system.
We call it our ecosystem of all these different data points.
So all this data is being captured,
everyone’s moving this direction on how best to bring all this data together and leverage it for AI.
Over the next couple of years, what I expect is
a lot more activity around causal inference, around explainable models.
The decision makers want to have the understanding of how their decisions are driving impact
and not just in terms of making predictions.
How do we use AI? A lot of robots that we’ve been trying to deploy
that can take care of some of the mundane tasks that associates used to have to do,
and then associates can then focus really on human aspects of retail.
Being able to spend time with our customers and interact and engage.
I think it becomes an imperative in our companies.
Reconciliations in your accounting.
In the past, people we’re sending thousands of emails around
companies to basically look for reconciliations.
You can really automate a lot of those.
The trend is actually that it’s becoming
more pervasive in all areas of your company.
Create Your First C# Windows Forms Application using Visual Studio
hey guys in this video I'm going to show
you how you can create your first
Windows Form application since C sharp
on your Visual Studio
so let's get started and let's see how
we can do it
so when you open Visual Studio it will
look like this here we are going to
create a new project so just click on
create a new project
and then here either you can search for
Windows Form application or you can just
select these drop Doms and select C
sharp here and the platform will be
desktop so you can just select windows
for example and then you can choose the
all project type and the project type
here is desktop and from here you can
see two Windows Form app options so here
we can select this option which is
Windows Form app using.net core so just
select this option and then click on
next
on the next window you can give the name
of your project I'm going to name my
project as my first project for example
and you can see I don't like to give
spaces in the project name so if
possible just write or give a project
name without spaces right and then click
on next
and here the framework will be dot net
6.0 or whatever is the latest version of
dotnet in my case it's dotnet 6.0 click
on create
and this is going to create a Windows
Form application in c-sharp for you so
now you can see my project has been
created
you will be able to see this kind of
solution on the left hand side and on
the right hand side you can see this
form one dot CS file so this is the
program file where you will write the
program
now how you can open the designer you
can see this form one dot CS file right
and when you just expand this uh you
will be able to see C sharp form one
designer also here right so when you
double click on this form one dot CS
file it's also going to open the
designer for you so just wait for the
designer to load for this form one so
now you can see this form one dot CS
design window is open
you can resize
this form one window here you can even
give the title to it right now the title
here is form one you can change the text
of this let's say you want to change the
text to uh my app and then press enter
the title has been changed to my app
right so you can change the text for
your form by just changing the title
here you have all the other options to
change the appearance of your form or
you can even change the font size
if you are using some fonts in your form
or you can also change the behavior of
your form so you can drag and drop some
components in your form from the toolbox
so if you don't see the toolbox just
click on this toolbox option here which
is going to load all the toolbox if you
want to pin the toolbox
window you can just click on pin and to
box window will be pinned here so you
can easily drag and drop all the
components from here
so you can see
all Windows Form components you can see
buttons labels and other components
I'm going to use a button so I'm going
to just drag and drop this button into
my form I can even use the label so I
can drag and drop this label into my
form
and let me also use the text box so let
me search for
this text box and put it here okay
so I can
you can see a drag and drop all these
components here now for this label
I can change the label text
from this
properties window so the text here is
label one I can just write
enter some text for example or enter
your value because I want the user to
enter something into the text box right
so I'm going to just write enter
some
text here and then press enter and you
can see this label shows that I will
just drag this text box here also
and now
in the behavior you will be able to see
uh all these Behavior options
I want to change the anchor option here
so you can see the anchor is right now
top and left I can even
click on this option to Anchor it to the
right side so what it's going to do is
let me just
resize it according to my form
and I can even
do the same for this label but I do not
need this for the label
so what I it's going to do is when I
anchor it to the right when I resize my
window you can see the text box resizes
right
same I can do with the button also so
this button text says button one I'm
going to just change it to
click me for example
and then press enter and you can see the
button text is changed
I can even change the anchor for it so
right now it's top left I can anchor it
to the right and then I can just move it
here and
then just
resize my button
until it shows this kind of
line here right
so now
when I even resize my window it's going
to uh
just resize according to the width of my
frame right I can even anchor this
button to the bottom so that
it moves to the bottom let's see how can
we do that so I can anchor it to the
bottom and then
what happens is when I just make it
bigger this button size becomes bigger
for example right so this is how you can
change the behavior so you need to play
with all these options and see what you
can do
for example I can change the background
color from here
so here I have all these options for
changing the background color
let's say I want to just choose this one
and then you can see the background
color of my form has been changed and
the background color of my button also
has been changed
so now let's write some code so what I
want to do here is whenever some text is
entered into this text box and when I
click the button I want to open a
message box with the same text for
example right so
the main thing to note here is the name
of this text box so when I select this
text box the name of the text box is
text box one so for using this name I'm
going to use this text box text and show
the text on the message box for example
right so just copy this ah name from
here and then select your click me
button just double click on this button
which is going to
create a listener for your button right
so the button name was Button one you
can even verify that by going here and
then you can see the name of this button
you can see the name of the button is
button one and the method which is
created is button one click listener
right so let me just write some code I'm
going to create a
string variable I am going to name it as
text is equal to and I am going to take
the name of my text box right which was
text box one so I'm going to just write
Dot
text which is going to uh
give me the text whatever I write in the
text box it's going to just take the
text and assign it to the text variable
right now I want to show this text into
a message box so I can just use a
message box component just write
message box
dot show
and then
I can just write
U entered and then semicolon space and
then plus and then the text variable
which is text okay once you are done
just save your code and then you can run
your code by just clicking on this run
Icon so I'm going to run my code
and hopefully everything works fine you
can see my code is running
when I resize you can see the button and
the text box resizes according to the
size when I move down the button size is
changed right now let me enter something
so I'm going to just write
Dom here and then I'm going to click on
click me button and it says you entered
Dom right I can just write 34 here and
I'm going to just click on click me and
it says you entered 34 okay
so it is going to open this message box
every time when I click on the button
and it's going to show whatever text I
wrote here
so this is the basic Foundation of how
you can create a Windows Form
application in Visual Studio using C
sharp and create your forms and use your
forms in Windows Form application so I
hope you've enjoyed this video and I
will see you in the next video
Dates, Times, and Drop-Down Lists (10 of 18) Building Apps with XAML and .NET MAUI
today we're going to continue building
out the UI of our app and we're going to
look at dates and times and drop-down
[Music]
lists hi welcome to visual studio
toolbox I'm your host Robert Green and
I'm your presenter Paul sheriff and we
are continuing on in our 18p part series
on building apps with zaml and Maui and
as you may have noticed lesie is not
with us she's unable to make the second
half of the recordings so it will just
be me and Paul but since Paul's the
guest we promise it'll be just as
exciting so previously uh we looked at
switches and radio buttons and today
we're going to continue building out the
UI of our app and we're going to look at
dates and times and drop-down lists
that's right very cool stuff should be
pretty fun so so what we'll do is we'll
switch over to the screen here and we're
on our user information screen we're
going to keep adding to this screen here
I'm going to add one more additional row
and then we're going to go down here to
the bottom like we've been doing we're
just going to insert some areas here so
I'm going to
change these two rows here so we're
going scoo those down and then we're
going to add another
label and we're going to add what's
called a date picker so the date picker
as you kind of expect is one that looks
like just a regular calendar that will
pop up on the screen now this is on
windows so if you you know bring this up
on your Android or your iPhone it's
probably going to look a little
different right it might have those
little things just scroll through to
figure out date and then the uh you know
the day the date and then the year so it
might look a little bit different
depending on the operating system that
you're running on yeah because we kind
of didn't we didn't talk about the
architecture of how all this works but
basically you
write s just as you write HTML and it is
nothing more than the instructions on
the renderer some rendering engine on
how to draw a page zaml is essentially
the same thing and when you build the
application um behind the scenes Visual
Studio is building a native Windows app
a native Android app a native iOS or Mac
OS app so you're going to get the native
control so there will be differences you
just write the ex once and then
sometimes you got to wait and see what
it looks like on the actual platforms
and then you may have to adjust as
needed right so basically they're just
taking that zaml translating it to
whatever the real code is that will
actually run on iOS or Android or
whatever yeah y so all right but this is
kind of nice you know we have a little
uh date picker here so you can choose a
date and then you know of course it
updates the screen and then in a little
bit here we're going to talk about Act
doing The Binding back to a an
object all right so there's a date
picker let's now go up and add yet
another row so all I'm doing is just
changing those row that row definitions
attribute and I'm just adding on an
additional row and most of them are
going to be Auto all right if you have a
list which we'll talk about later in
this uh series we'll probably start
using the asteris to say take up the
most room for that particular list but
for now we're just going to stick with
the
auto so by adding another one that means
down here I'm going to be able to insert
right after the birth date here A Time
picker and then of course I'm going to
increase these rows here by one and now
this actually does look very similar to
what you might see on iOS or
Android this little time guy here right
so you can choose from the different
columns here you can move up up and down
and you can choose AM and PM and you can
just choose whatever time that you want
you click on the little uh check mark
there and that says accept it otherwise
if you'd made changes and everything you
canel it it just stays where it
was all right so time picker we have
date picker and then I'm sure a lot of
you have been doing development for
quite a while and so we always have some
sort of drop- down list where we want
the user to be able to choose
values so we going to give them a list
of values and they're going to choose
one so again I'm going to go back up
here go to
auto and once again we're just going to
increase everything down
here we change this one to 11 this one
to
12 like I said I really hope in the next
version they're going to give us a
little more help on that
so all right so what I'm doing in this
one is I'm adding label as you can see
here on lines 103 and
104 and then I'm using the flex layout
again so I wanted to be aity to have an
entry area and then a picker right so
now the Picker you'll notice that I'm
getting these squigglies here and the
reason why is when you add a picker and
it's got this hardcoded array you must
stop and restart in order for that to
take so if that ever happens to you
you're going to if you see those little
squigglies you just got to restart so
that squiggly is just a hot reload thing
it's nothing wrong with your code you
got it got it yeah so if you're you're
dynamically adding things you're getting
squiggles and you know that that code is
correct it probably just means you got
to do a you know the hot reload isn't
gonna be able to reload that guy so
you're gonna have to restart and then a
few episodes ago you would talked about
the difference between just writing the
straight zaml and using the property
windows so is this a perfect example of
when instead of doing picker. item
Source xarray type equal and then
wrapping all the values in strings that
you could do that more easily with the
properties
window you know I haven't tried that one
that's a really good question let's
actually go here let's bring up the
properties's window I always just write
the actually I never write hardcoded
stuff like
this um I mean but if you doing a
prototype or something you might want do
something like this right so what you're
asking really is could you come in here
and actually go into the items and add
something so I'm I'm sure you can uh
let's see if we do an ad here no see it
doesn't work on the items okay
interesting might on the item Source
let's see okay so let's see
here well I've not seen any direct way
to do it here it's just giv me an object
and the object itself isn't really going
to work for us because we need this for
okay yeah good good question though and
that that would be normally something
that I think you could do um I typically
used it like in WPF when I was building
uh menu items and things like that I
found it pretty helpful um but tell you
the truth I don't really use it a
lot pretty much stick in the zaml which
is I think what you do too sure but
that's how we grew up uh doing that's
right did we ever grow up Robert come on
no that's what we have SP our career is
doing let's put there we go that's
that's a better good
point all right so let's go back here
and so what I wanted was I wanted this
ability to have an entry screen entry
area here and so I can type in a phone
number for
instance and then I wanted to drop down
so the user could choose hey what kind
of you know phone number is this right
so is it mobile is it home is it other
and you see those values here now being
represented here in this picker or drop
down
list right yeah so and the reason I use
a flex layout is I didn't want to use I
didn't want to have to have the grid
three columns I think I mentioned this
before I find it better if you stick
with just two columns for entry screens
if you have more than you know two
things that you need go to this Flex
layout because then if if for some
reason it needs to you know wrap and I
don't think I actually put the wrap in
here on this one so we do Wrap like
so okay and then let's see direction
would be
row and that way it could push this
underneath I think that's another one of
those I got to restart but you get the
idea okay okay so anytime you have more
than one thing in that second column use
the flex layout and that's going to give
you the most flexibility and so so
basically if you narrow the
screen then instead of being off the
screen and not visible that picker would
just flip down below that phone number
okay just like these check boxes did up
here if you remember those were also
wrapped within the flex layout you can
see here yeah so I think the wrap and
the direction I think that has to be a
restart on that or could even just be a
hot reload uh I think it's a a restart
type of
situation so you just want to you know
make sure you're always putting that in
if if that's something that you need I
personally like I said never go beyond
two so I I do use this Flex layout quite
a bit
so all right let's try this out this
should actually give us what we're
looking for here oops there we go let
see mobile
one that oh oh you know what it can only
go so far see look at this it's on the
same here okay so which means that it's
determining that the minimum width is
you're fine basically because that I
mean there's no way a phone's going to
be less than about like that okay right
so so in this particular case it didn't
need it which is great but you could see
let's say if we added a little bit more
room to this right I did a minimum
request here you know if I if I move
this out a little bit maybe it will
cause it to
wrap and for some reason boy it's just
not wanting to is
it so well I I you know I think it's
just one of those things where it's
termining that hey you know what we're
fine but y we'd again have to check with
that and well main thing you try it on
your Android or your iOS and make sure
right cool all right great so there we
go date Pickers time Pickers and those
uh uh drop- down lists which is just
simply called a
picker excellent and then of course
there they come with all kinds of
properties so you can set default values
and you can that's correct absolutely so
you can see on the time I did re I did
set the default time here to 6: am y you
know you can do the same thing on the
date picker you can set the date
property and then maximum date minimum
date Etc oh yeah so if you're doing a
some type of thing where you can only
enter a date that's a week from today
you can set the minimum date to today
plus s Etc you got it and again let's
say you wanted to do something a little
more than Dynamic you don't want a
hardcoded datee in here or hardcoded
minimum and maximum date right that's
one of those times when you would name
this control yep you know the date or
whatever yes yeah because then in the
back you know in your code behind you
can actually use C to say the date. DAT
equals date time. now for instance right
you know and minimum date could be you
know today's date and maximum date could
be plus you know 30 days or something
sure so cool yeah so anytime that you
need to find yourself going to write
some code to dynamically set things like
maybe you want the time you don't want
to default it to 6: am you want it to
whatever the time is right now or the
nearest hour to that right again give it
a name and then in the code behind which
we're going to talk about little bit
more code behind here coming up that's
where you would then be able to set
those particular
values excellent y all right so what's
in our next episode so coming up next
we're gonna actually start talking about
data binding which will be great um
we're gonna kind of got a couple of uh
versions of data binding we're gonna
look at the first one is actually going
to be just kind of binding controls to
controls so like on the screen you want
this control to affect how this control
works we'll talk about that and then
we're going to talk about creating C
objects and binding those
to our UI cool can't wait all right all
right so thanks for watching and we will
see you next time on Visual Studio
[Music]
toolbox
Death to the CMS Updateable Static Sites for NET Developers
all right we have Jay tower with us and
Jay is going to talk about death to the
CMS and that's gonna be interesting I
mean the CMS no ill will nothing
personal it's just business that's right
exactly
that's right whenever you're ready all
right let me go ahead and share my
screen here okay all right so yeah let's
talk about death to the CMS I hope
everyone's enjoying net comp 2019 so far
I know I am just enjoyed watching
Geoffrey Palermo about DevOps now we're
gonna talk a little bit about updatable
static sites for dotnet developers as
the guys mentioned my name is Jonathon
tower I go by Jay I'm a partner and a
principal consultant at trailhead
technology partners we're a Microsoft
Gold Partner we do a lot of custom
software application development and for
our clients so if anything we talk about
today or any of that stuff is something
interesting to you these are places you
can reach out to me online and I'd be
happy to connect about anything and down
at the bottom too I've got a github link
which I'll show again at the end of the
presentation where you can actually get
the slides for this presentation that
I'm showing right now all right so let's
jump into it what we're gonna talk about
we're gonna talk about what is a static
site generator why you might want to use
one of them I'm going to give you some
examples of a few different popular ones
both non dotnet technology ones and then
some of the more popular dotnet based
ones I've selected one of those which is
called ym that I'm going to do a few
demos in including some demos of the
command-line interface what it might
look like if you're developing a static
site on your local development
environment and then building off of
some of the things Jeffrey was just
talking about with Azure DevOps I've
created DevOps pipeline
which responds to some new code being
checked into a repository and runs a
static site generator builds that
content out to an azure to an azure blob
storage actually that's acting as a
website and then we'll wrap it up with
some further investigation topics if
you're interested in learning more about
this some some recommendations I can
make for where to do that and then
hopefully we'll have a little time for
for some Q&A at the end so we'll start
out with what is a static site generator
if you're not familiar with them already
it basically allows you to compromise
between a hand-coded static website and
a full-blown CMS if you're not familiar
with CMS's some popular ones out there
like WordPress it's a content management
system allows more non-technical users
to actually create content have that a
content go through potentially an
approval process and then have that
content eventually find its way out to a
live website static site generators
allow you to basically generate HTML and
CSS files from themes and template files
such as markdown for example they also
then allow you to transfer those files
to a web server and then have that
server basically doing what it's really
good at which is serving static files to
users that are requesting them so just
to kind of map that out a little bit
what that looks like a lot of us are
probably developers or web developers
and we're kind of used to what the
dynamic web application lifecycle looks
like so all of this happens at request
time a user is going to go make a
request to one of our sites or
applications if that's like CMS or if
it's a asp net core application that's
going to run some sort of an executable
on the server that executable is going
to go with some predefined templates
let's say maybe like razor pages in the
case of asp net core and maybe connect
to the database and get some additional
data basically merge that all together
and build it into a
response to go back to the user but all
at request time so all that processing
has to happen on the web server for each
request now when we're talking about a
static site that's been generated
there's kind of two different time
frames there's the compile time frame
and then the request time so let's look
at the compile time frame first you will
start with templates and content files
and you would run that at compile time
through a generator and that generator
would actually create your website as
static files in some sort of a folder
structure you can then take that set of
folders and files and upload them to
your web server and now when a user
requests at request time one of those
pages it's going to just be served from
the web server as a static file so why
would you want to use static sites
instead of the dynamic sites the dynamic
sites can kind of do all of that it
could be static it could be dynamic so
why would you want to limit yourself in
that way well main two reasons are
faster and cheaper so nothing for a web
server is faster than serving just a
static file as sort of a case study I
took a site recently that was running on
a CMS and I was getting about one and a
half to two and a half second response
times especially two and a half seconds
the first time someone would come to
that site I was able to just make that
same site static site and get those
response times down to like 250
milliseconds so definitely a order of
magnitude faster if you think about that
from your users experience perspective
that could be very significant
especially if they're moving from page
to page and seeing that that increase
repeatedly and then the second reason
nothing is cheaper so with that same
site I was paying about $40 a month to
host that and moved it over to an azure
blob storage which you can now set up as
web a public website and was able to get
actually a slight increase in the
traffic that that site was seeing and it
still went from that $40 a month price
to less than $1 a month just because
it's so much cheaper to host the static
files and serve those static files all
right so I want to review with you if
you haven't heard of static site
generators before I want to review some
of the more popular ones that are out
there first starting with the ones that
are not dotnet based you might have
heard of some of these if you're into
the space at all Jekyll is a very
popular one it's based in Ruby and it
uses a template language called liquid
there's another one called hex Oh which
is JavaScript or nodejs based and one of
its real strong points as you can see
here in this chart this table here is
that it uses all kinds of different
template formats so if you're interested
in flexibility that might be a good
option for you then moving on to Gatsby
if you're a react person if you like
react for your web UI framework for
JavaScript then you're gonna really love
Gatsby because it's using JavaScript as
its runtime and it's also using react
for its templating go is a popular
language right now that's really known
for being highly performant and Hugo is
cool because it uses go for both its
underlying technology and for the
templates that you build and then
finally Knox j/s is based on JavaScript
and node.js and if you're a vue.js
person if you like that for your
front-end your eyes and javascript you
would really love this because it uses a
view for its templates now switching
over to the dotnet world these are all
static site generators written in dotnet
first of all why am that one actually
uses razor syntax for its templates and
markdown as well so if you're familiar
with either of those that can be really
useful razor if you're not familiar with
it is the same technology asp.net MVC
uses for its pages as as well as razor
pages used for its UI views
then pretzel is also using liquid so if
you are interested in using the liquid
template but doing it on a dotnet
technology you can use pretzel graze
offers just razor and then there's
another one called iron beard as well
that's down that base which uses razor
and mark down like ym does now I'm gonna
focus from now on I'm gonna do some
demos I'm gonna show you guys why am i
picked that one to kind of delve down
into so let's jump into that we're gonna
start out with the demo of using ym as a
at the command line interface so I'll go
ahead and open my command line here and
to start out with I'll just make this a
little bigger for readability and I'm
just gonna do a directory listing you
can see there's actually nothing in this
directory right now now before the
session today I went ahead and installed
why I am just so that we didn't have to
wait for that but if you wanted to
install it yourself and you've got the
dotnet CLI installed already it's a
dotnet tool which means you can install
it using the.net command line so I could
do dotnet tool install - G which means
I'm installing it globally and do y MDOT
tool now if I do this right now you're
gonna see an error message that says
that that's already installed like I
mentioned so I don't need to do that
again but now with it installed I can
use the ym command and as a sub command
I'm going to start with the new sub
command and say I want to build a new
project in this directory and I'm going
to use the - our flag here to indicate
what recipe to use and specify blog as
the recipe type so recipe is kind of
like what type of website
am i building it's a blog website with
content pages the blog template is a
good one to use you could do an e-book
template or recipe there's also like an
online documentation recipe that you
could use and several others that you
can find online as well so if I go ahead
and run that we see the ym ASCII art
logo up here
then you can see it's detecting that
there's no input directory or a
configuration file that's creating both
of those downloading some new get
packages for ym to my global packages
folder and finally cleaning up a temp
folder that it used so if I do a
directory listing now we can see that
there are a couple things in this folder
there's a configuration file for ym and
there's also an input directory so if I
switch to that input directory you can
see a markdown file called about and
another directory called post so if we
switch into that and do a listing you
can see there's another markdown file
here called first post that markdown so
basically I've got a blog post a single
blog post in here and I've got a single
page called bout in this directory in
the input directory and that's basically
it
that's the input files that I would edit
or add to to create a ym based site now
if I want to actually build that site I
can use the ym command again the sub
command to build it is build or actually
the build sub command is the default so
if I'm just trying to do a build I don't
actually have to specify build I can
skip that now I'm going to specify again
that I want to use the recipe called
blog and this time I'm going to also
specify a theme which is the - T flag
now what a theme is is basically within
the blog style of site or blog type of
project I can have all kinds of
different themes and themes are like how
it visually looks what the layout of the
pages is what assets are included as far
as images and CSS or third-party
libraries so there's one that's built
into ym called clean blog and I'm going
to use that just as a starting point
here alright so I went ahead and ran
that build command you can see it's
actually locating my configuration file
looking for the new get packages and now
it's actually running through the build
steps through the build pipeline and if
I do a directory
listing again you see there's a bit more
in the folder now than there was before
including this output directory so if we
switch to the output directory and do a
listing I see what should look fairly
familiar to any of us web developers a
bunch of basic site root folder type of
files so I've got my about page
I've also got a post a posts folder and
if I change directory to that and look
you can see there's an index page in
there as well as a first post dot HTML
so I'm going to go back up to the ym
folder and I also want to open this up
in Visual Studio code a minute so you
can see a little bit of what's in these
files alright so if I look at the
configuration file it's basically it
looks like c-sharp code because it is
c-sharp code so I am able to set any
kind of global settings or configuration
here and then if we look at any of the
markdown files if you're familiar with
markdown these are gonna look pretty
familiar to you the only thing that's a
little different is above these three
dashes is sort of like the header for
this ym file I can specify some of the
metadata about this document or blog
post in this case like its title the
date that it's published and any tags I
want to include on that those are all
things that are defined by the recipe in
this case we're using the blog recipe so
title published and tags are all things
that the blog recipe knows how to handle
now if I go into the configuration I
want to change one setting in here so
I'm going to say settings and its keys
that link hide extensions and I want to
set that to false basically what this is
gonna do this is going to allow me to
view these to view this site on my local
development environment by making all of
the links from one page or one post to
another use the dot HTML extension at
the end
the names at the end of the paths so
that they'll work on my local
development environment alright so now
I'm going to tell why I am to build
again with blog recipe and the clean
blog theme and then when that finishes
running I can actually do a preview mode
where ym will open up a web browser for
me and I can do that I'm sorry web
server for me do that by doing
I am preview and you can see now the
output from this says I can go to
localhost 5080 I'm going to pull my web
browser over here and go to that and you
can see now that I get my page if I go
to the about page you can see that
that's working and if I go to the first
post that was defined you can see that
that has been created as well so this is
kind of nice handy to use for
development time to see how my site is
working when I generate it it would be
really nice if I could basically just
run that in the background to make
changes in visual studio code and have
it update automatically and I can do
that by just doing why am - preview I'm
sorry - watch - preview and now it's
going to actually watch that directory I
can make a change in the directory at
any time to any of the input files and
it's going to automatically update that
on this site so if I open that browser
back up again and go to the first post
for example now that it's running in
watch mode I can go edit this and change
the post to say hello world and save it
and now if I flip back over to the
browser without even refreshing you can
see it's already updated - hello world
alright so now I want to show you one
more thing which is how to integrate
static site building into a Azure devops
pipeline
some of the stuff that Jeffrey was just
showing us in Azure DevOps so if I pull
my a DevOps project over here I can show
you that I've got a repo set up and it's
got as you can see it's got a ym site in
it including the input so it's the same
basic template that we were just working
with and now if I go open that open that
in Visual Studio code so it's the same
code that we were just looking at
basically and I've also set up a build
pipeline to run ym and then a release
pipeline to copy the output folder of
that into an azure blob storage now
azure blob storage right now is up at
this static site here which if I just
refresh you can see if I click around
it's it's currently working so what I
want to do is I want to add a second
post to my site a second blog post so I
can easily do that here by just creating
a new folder in my new file in my posts
folder I'm going to call it second post
dot MD and then I've got some content
then I'm going to borrow here from
another file which is just some basic
some basic content that you might have
for markdown just basic markdown sample
file here basically okay now I'll save
that and if I go into my
choice you can see here that I've got a
change so I'm going to go ahead and
stage that change and then say I'm
adding a second post and push that into
my repo and while that's building while
that's pushing let me look at the actual
repo here which now if we look at the
build you can see that it's actually cue
to build to run with that add second
post and it's the trigger for it and if
I actually go in here I can actually see
as the agent spins up I can see what's
happening but I actually want to go to
the build definition a second so that I
can show you guys what that looks like
so it's really simple this is a sure
hosted agent which means that it's going
to be a potentially a new agent every
time if I hosted this on a server or
virtual machine that I owned I could
actually skip this first step which is
installing the ym tool this adds about a
minute to the build time so it would be
great if I could do this on my own
hosted agent that I am my own custom
agent that I hosted and I could skip
this step it would save me about a
minute the second step here is just
running ym so if you look at this
command this very similar command to
what we've just been running at the
command line interface and when it's
done I'm just publishing the output
directory into a drop folder an artifact
called drop so that I can grab that in
my release now if we look at the release
I'll show you the definition of that as
well so this is basically just going to
look for any changes that happen in my
static sites build anytime a build
completes and I've got it enabled for
the continuous deployment trigger
meaning any time that happens it's going
to constantly deploy automatically and
then if I look at the actual jobs that
are happening it's basically just one
step and that is to copy the contents of
that drop folder to an azure blob that
i've
to find which you can see is that same
name of the site that we we were looking
at a second ago and it's going to copy
it into the dollar sign web folder which
happens to be the one that you want to
use if you're hosting a static site on
an azure blob and let's go see how that
build is actually doing so the build is
still is running the ym step right now
so you can see it actually does take a
minute to run through all of that and
now it's publishing the artifacts to the
drop folder and so now if we switch over
to the release we should see the release
pick up that in just a second it looks
like maybe it finished already now here
it goes so that release is currently
queued in just a second here this
release all get an agent available from
Azure DevOps and it'll actually copy
those content here you go you can see
it's waking up now and it's going to
download the artifacts the drop
artifacts that I defined and now it's
actually running my Asscher blob file
copy command and in just a moment here
it'll have copied all of those files
over to the azure blob storage and we'll
be able to go refresh that site and see
that we've got that second post on there
while we're waiting for that to happen
though let me actually show you my
further investigation topics if you're
interested in learning more about this
static gen comm is a great resource it
talks about all these different static
site generators helps you compare and
contrast them the different features
that they have the different
technologies that they're built using if
you're interested in getting the
advantages of CMS without the speed the
slowdown of one a headless CMS might be
the right choice for you it basically
gives you the advantage of the back-end
part of the CMS while still having the
site be a statically generated site so
headless CMS dot org is a great place to
start with that
my demos have been with ym do you can go
to ym do to check that out and then if
you're interested in actually building
applications using static sites you want
to check out something called the jam
stack which is jam stack org basically
brings JavaScript and rest api's to play
on these static sites and creates helps
you turn them into actual custom
applications alright let's go check our
site here real quick and see if it's up
and running you can see it is now
generated the second post and if I click
on it I can see the content there that
was generated from that markdown file so
it worked perfectly and that brings us
to the question and answers so does
anyone have any questions I can help
address all right awesome awesome we got
a couple questions so right the question
was asked what's the impact on SEO when
you're creating static files is it
better what's the impact yeah that's a
great question there's a couple of
impacts off the top of my head one of
them is one of the things that SEO
search engines are concerned with such
as Google and Bing is how fast and
performant your site is so by making it
a static site versus a CMS you're very
likely to have a pretty significant
speed increase which means that you're
you're sort of points or your score with
the search engines is likely to go up
one thing to think about though when
you're if you're migrating from a CMS to
static sites is that you do want to try
and keep all of your URLs the same so if
you have sites that are currently at you
know your site com slash blog slash blog
title you'd want to try and configure
your static site generator to regenerate
all of those same URL paths so that if a
user visits a link to an old blog that
was on your CMS it's
all gonna work on your statically
generated site right and then what about
ym performance for compiling very large
sites like doc sites yeah
yeah that's a great question so
obviously the performance decreases has
the site in size increases one of the
ways that you could address that is to
actually break it up into pieces so that
if someone checks in a change and it's -
you know one of seventeen different
areas that you have major content areas
that you have on your site you could
actually make that one site that
generates and then have the other 16
sections of your site not regenerate
because of that that's a good approach
all right great
hey Jay thanks so much for doing this
this was awesome I put yeah absolutely
thanks so much for having me we're gonna
take a break and then we will be back
with Maddy talking about xamarin all
right thanks so much everybody to see
you guys in a bit
Debugging Basics [1 of 5] Beginner’s Series to Visual Studio Tooling for Unity Developers
>> My name is Charles,
and in this video,
I'm going to show you how
to use the debugger in
Visual Studio to get a
better understanding of
what your code is doing at runtime
so you can fix bugs faster.
If you'd like to follow along,
the example project used in this
video is free for download.
Unity comes with a rich set of
features that you can use to
implement game mechanics and
create stunning visual effects.
Its physics system can simulate
almost any physical interaction,
and its visual tools like
Shader Graph and the Universal
Render Pipeline can be
used to generate an extremely
realistic or stylized
look for your game.
When coupled with its
scripting engine,
there's no limit to the variety
of things that Unity can achieve.
However, as great as
these features are,
they tend to slow down the
process of debugging your code.
Let's take this project, for example.
As you can see, it's a
relatively small game
with a few simple mechanics.
We have a third-person view
of the player and we can
perform various attacks against
the enemies that are
spawning around us,
my favorite which is this really
cool shooting mechanic where
the camera moves in over the
player character's shoulder
when her gun is drawn.
Very cool, except it has one problem.
While everything seems
to be working fine,
the console is filled with errors.
Let's pause the game
and take a closer look.
At first glance, we can
see that this error
is being caused by a Null
Reference Exception.
More specifically, if we click
on the error in the console,
we can see that this exception
is occurring somewhere in
this SendDamageMessage method
in the ParticleCollisionListener
class.
Let's go ahead and open
that up in Visual Studio.
Somehow, a variable in
this method is inadvertently
being set to null.
In programming, null
values are very bad.
They represent a void or
black hole in your code,
so we'll need to account
for that in this logic.
But we can't do that if we don't know
which variable is being set to null,
so we'll need to do some debugging.
A common approach to
debugging in Unity is to use
log statements to reveal
exactly where your code
is doing in the console.
Let's add a few calls to Debug.Log
to our broken method now.
We will place one at
the top that lets
us know when the method
is being invoked,
then another to display the value of
this variable here called Damageable,
as well as one to display
the value of Message.
Finally, one at the end
of the message to let us
know when it's completed
its execution.
Now, we can play the game
until the error appears
again and analyze the logs to
figure out what's going on.
It looks like there's
some edge case that's
causing Damageable to be set to null,
which results in our
Null Reference Exception
when the applied damage
method is invoked.
It's a good place to start,
but we still need more information,
which means we'll need to add
more log statements and
run our game again,
and even that might not be enough.
We might have to complete two
or three more iterations of
this slow trial and error approach
before we fully understand
how to fix this bug,
and that just takes too much time.
Luckily for us, Visual
Studio has a tool
that offers the perfect
solution to this problem.
The debugger in Visual Studio is
a tool that allows us to step through
our code line by line and inspect
the values of our
variables at runtime,
or in other words,
as the code is actively running.
To do that, we'll need
to make sure that
Visual Studio is attached
to the instance of Unity
that's currently running
our project by either
clicking the play button that's
labeled Attach to Unity,
or by locating the Unity
instance manually,
which we can do by expanding
the Debug menu and clicking
"Attach Unity Debugger."
Doing so will open
a small window that
contains a list of all the
available Unity instances,
including remote instances that
are running on your network.
Let's go ahead and click
on "Attach to Unity",
which is a much quicker option.
Now Visual Studio's attached to
the correct instances of Unity,
and we can start
debugging our project by
switching back to Unity
and pressing "Play".
Now we're officially
debugging our project.
But if we want to find out what's
causing our null reference exception,
we'll need to set what's called
a breakpoint in our code,
so let's stop running
our game and switch back
over to Visual Studio.
Breakpoints are a feature of
the debugger that allow you to
pause the execution of your
game on a single line of code.
Once paused, you can
examine variables,
step through the code,
and perform other
similar debugging tasks.
Let's set up a breakpoint at the top
of the SendDamageMessage function.
We can do that by clicking the
gray bar to the left of our code.
Alternatively, we can expand
the Debug menu and click the
"Toggle Breakpoint" button,
which has the keyboard shortcut F9.
Now we're ready to start debugging.
We can do this by switching back to
Unity again and pressing "Play",
or by expanding the play menu
and selecting "Attach
to Unity and Play",
which will play the
open scene and switch
the focus back to Unity
for us automatically.
Now, the key to diagnosing any
problem is to recreate the bug.
But first, it's important to
understand what the
code actually does.
We'll start with the happy path
and shoot an enemy so we can
step through the code and see
the expected behavior play out.
Now that we've shot an enemy,
we can see that the
running scene is paused,
which means that our
breakpoint has been reached.
Over in Visual Studio,
we can see that the first
line is now highlighted,
signifying that the execution
is currently paused there,
and down at the bottom of the screen,
we can also see that
the debug window is
populated with all the variables
that are currently in scope,
including the offending
Damageable variable.
Let's move the execution of
this code one step forward by
pressing the Step Over
button in the toolbar.
Now the execution has
progressed to the next line.
If we look back at the debug menu,
we can see that the
Damageable variable has
now been populated and
is no longer null.
If we set forward again,
this time I'll just
use the shortcut F10,
and one more time, it's clear that
the code is working because
the exception was not thrown.
Now we can go ahead
and recreate the error
by shooting a non-enemy in the scene.
First, let's let the code
go back to executing as
normal by pressing the "Continue"
button in the Toolbar.
Then let's switch back to Unity
and shoot this box in our scene.
Now the scene is paused,
and the Visual Studio debugger has
stopped the execution
of the first line,
so let's step through it
again, and look at that.
In this scenario, the damageable
variable is null because
the game object that was passed
into this function, the box,
did not have the component called
Damageable attached to it,
and when we set to the next line,
we can see that the
exception is thrown,
which, of course,
we'll need to handle.
Thanks to the debugger,
we were able to recreate
the bug and determine
what was causing it.
All we have to do now is add
a simple null-checking
guard clause to
the top of the
SendDamageMessage function.
Then step through the code one
last time and confirm that it works.
Let's go ahead and add our new logic.
The guard clause right after
Damageable is initialized.
If Damageable equals null, return.
Now, with our breakpoint still
in place, let's test it out.
We'll take aim at our box,
and now we can set to the code again.
But this time, our guard
clause will recognize that
Damageable is null and break
out of the function early.
We can quickly confirm this by
hovering over Damageable with
our mouse to reveal the
inline inspection tool tip.
Sure enough, Damageable is null,
so our logic will now
break out of this function
prematurely to avoid
the null reference exception
from being thrown.
Log statements are a quick way to
expose what your code is doing,
but they only offer so much.
The Visual Studio debugger,
on the other hand,
gives you access to all the
information you need to
understand how your
logic is operating,
and the setup and process is similar
across all Visual Studio products.
So whether you're
using Visual Studio,
Visual Studio for Mac,
or Visual Studio Code,
make sure you take advantage
of this powerful tool so you
can debug issues more
effectively and fix bugs faster.
[MUSIC]
Debugging Tips and Tricks Part 2
>> On today's Toolbox,
we're going to continue
fixing the app we started
working on last week,
and Leslie will show us additional
tips and tricks for debugging.
Hi, welcome to Visual Studio Toolbox.
I'm your host Robert Greene,
and joining me today for part two of
our debugger tips and tricks
is Leslie Richardson.
>> Hey there.
>> Hi, Leslie.
>> Hi.
>> Welcome back.
>> Thank you.
>> You haven't changed a bit since
we recorded the last episode.
>> I know. It was almost like it
like happened five minutes ago.
>> Almost.
>> Yeah.
>> So refresh our memories,
what did we see in part one.
>> Yeah. So in part one, we talked
about a lot of different things,
from Run To Click, set
to .NET statement,
Text Visualizers, DebuggerDisplay
which is my personal favorite,
and of course,
conditional breakpoints,
tracepoints and the list goes on.
>> Cool. So what are
we going to see today?
>> So today we're going to see
a lot of different things,
including some of
the new 2019 features like
Search for the Watch window,
manage data breakpoints.
>> Okay.
>> Then other little things peppered
throughout in the Watch window
such as return value,
keywords, and format specifiers.
>> All right. Cool.
>> It goes on.
>> All right. We're
using the same app.
>> Yeah.
>> Which in spite of
the fact that we've
spent all last week fixing it,
still isn't 100 percent correct.
>> Yeah. Still many, many problems.
>> We like to mimic
the real-world in this show.
>> Fair enough. Yeah. So again,
as a refresher, this is
the same app as in part one,
but it's an app that
will randomly give me
a list of books that I can choose
to read and add to my shelf,
or I can choose not to read it and
it won't be added to my shelf.
So there's several more bugs
that we didn't
fix last week or throughout
the week either,
so they're still here.
So let's investigate those.
So I'm going to add a book,
in this case, this book called
Middlemarch to my shelf.
When I click on it, one of
the problems I have been
experiencing revolves
around this String
here that says that I've
read the book one time.
>> Already. Wow.
>> Yeah, already. I know. I
haven't even heard of the book.
>> That leads you to where to
get to your 100 books done.
If you just click it, it
will mark it as read.
>> Yes. There I already read it.
>> Then I'm going to predict
that that date is an issue.
>> Yeah. That date is also an issue.
>> Looking ahead.
>> Lots of problem is going on here.
>> Okay.
>> Yeah. So what's supposed to happen
is when I select 'I
finished this book',
this value should increment by one.
It's already saying I read one time,
which is ominous in and of itself.
>> Okay.
>> So if I say that I
finished this book,
it should jump from one to two,
but if I do it in this case,
it's jumped from one to four.
So either I subconsciously
read this book three more
times in the last three seconds,
or there's something going on
in Visual Studio and my code.
>> Then the date changes.
>> Yeah. All right.
So let's see if we can
fix that problem of
reading it three additional
times out of nowhere.
>> Okay.
>> So I'm going to
set a breakpoint at
the start of my index function here,
and that will hit when I
go back to my shelf page.
From there, I want to hone in on
that specific book which
was called Middlemarch.
I can't even remember the title
and I read it three times.
So from there, instead
of simply expanding until
I find what I want,
I can use the brand new
search tool available and
the Autos, Locals, and Watch windows
for our Visual Studio 2019.
>> Oh, yes.
>> So from here,
I'm going to do Middlemarch,
I think I can just say middle.
As you can see, I'm directly
taken to where I need to go.
>> That's so cool. Again,
that is new in 2019.
>> Yeah. It is brand new.
>> Now, I remember correctly
you wrote a blog post on that.
>> I did. I recently wrote
a blog post on that,
where you can go to
aka.mswatchwindowsearch,
and then check it out.
>> Cool.
>> For more detailed info.
So from there, I have that.
You'll also notice that
as I start typing,
it will automatically
start highlighting for me.
So in the case you don't want
to execute the full search,
you can just type away and
if it's visible on screen,
it will start highlighting
and you can find things
that way as well.
Especially, this is
really nice if you have
a bunch of items in
the Watch window at a time,
which can save you
the trouble of having it all.
>> Does that do both the
name and the value?
>> Yeah. So you can search for name,
value or type if you wanted to.
>> Okay.
>> So if you just wanted
to see all the types,
I can search a reading list and
as you can see I'll start going.
>> Okay. Cool.
>> All right. So from
there I have Middlemarch,
and I'm specifically interested
in a property that this book has
called timesRead and
this is the property
that's supposed to increment
every time I finish it.
So I'm going to go into timesRead,
and this time I get
a notification telling me
that it couldn't be found,
but luckily, it's giving
me the suggestion to
bump up my search depth
to a larger number.
So I'm going change the search
depth here to three,
so that I can search more thoroughly.
>> Does it default to two.
>> For me I set my default to two,
but normally when you first download
Visual Studio for the first time,
it's set to three.
>> Where do you change
that, is that an option?
>> Yes.
>> Or just remember
the last thing you set.
>> Yeah, it will remember.
>> Okay. Got it.
>> So if you set your search depth to
10 and then you exit out of
the session if it's reading one,
it will remember that you were at 10.
>> Okay.
>> Yeah. I'm going to
bump mine up to three,
and then I'm taken to
that particular property,
again saving some time of having
to remember where that property is.
Now, the case that I'm
trying to deal with is,
why is this timesRead property
changing without my knowledge?
Normally, this is when I might
have to play some trial and
error and try to narrow down
where it could possibly
be coming from,
but I ultimately don't know
where that location could be.
So I can use something
called a data breakpoint,
which has existed in C++ for awhile,
but is brand new to manage
code users in .NET Core 3.0 in 2019.
So this is a breakpoint
that will allow me to halt
my code when a specific
object's property changes,
even if it goes out of scope.
So I'm going to use that in
order to track down the problem.
So I can right-click on
that property and then select
"Break One Value Changes".
I know that the data
breakpoint has been
created because I have
the standard breakpoint icon there.
>> Nice.
>> Yeah. Of course I
can see it along with
the rest of the other
breakpoints that
I have in the breakpoints window.
Then if I scroll up a little bit
to the top of this item,
an object ID has been created,
and this is how Visual Studio
will be able to keep track
of that object if it ever goes out
of scope while my program is running.
So from there, I'm
going to hit "Continue"
and perform the same action again,
and hopefully I get
some quick fast useful information.
Yeah. So this time I
get an a notification
telling me that my data
breakpoint has been hit,
with an added bonus
of telling me what
the previous value of
that particular property was,
and now what the new
current value is.
It'll also redirect me to
the exact location where
that change came from.
So in this case, obviously it's
coming from the property setter,
which makes sense, but ideally,
I'd like to know what called it.
So I can go into the call stack
and then just double-click here,
and then I'll be taken to
where that setter was called.
In this case, it's happening in
my get shelved book function,
which I don't need because I already
set the timesRead property
to be committed elsewhere.
>> Yeah. So you retrieve the list.
So the fact that you got the book
off the shelf is being
equated to reading it.
>> Yeah. Apparently.
>> Yeah. Okay.
>> That's what I did in
high school from time to time
if I didn't like the book,
like time to go to spark notes,
but I'll buy the book anyway,
just so it looks legit.
>> So there's
another blog post that you
wrote on this as well,
Managed data breakpoints.
>> There is, yeah. Yeah.
Definitely go check
it out at
aka.msmanageddatabreakpoints.
>> Managed data breakpoint.
>> Yeah.
>> All right.
>> Kind of a mouthful but.
>> We'll have these
in the show notes.
>> Yeah. Looks all good.
>> All right. Cool.
>> Great. So now that
I found the issue,
I'm going to comment out this line.
>> That is really
helpful because you're
now being notified when it changed,
and then go finding out why,
and then you get to decide whether
that's valid or not. Very cool.
>> Absolutely. So it can be great
in several different scenarios.
>> That can save a ton of time.
>> Right. Yeah. You
don't want to play
trial and error all time nonstop.
So this is currently a
Dynacore 3.0 exclusive
feature at the moment though.
>> All right. Okay.
>> So yeah.
You're going to need to get
3.0 and play around with that
if you want to check these
out in a managed code land.
>> Is it scheduled to make it
into framework or is that TBD?
>> TBD.
>> Okay.
>> We've gotten a lot
of feedback about that,
so it has not been forgotten.
We are acknowledging that
and go in from there.
>> Okay.
>> Cool. So going back and
performing that same action.
In this case, I'm going to read
some other book I've never
heard of called Mrs Dalloway,
but this time correctly it
tells me I haven't read it yet.
>> Okay.
>> So that's a good sign.
If I say I finished
the book and go back to it,
it's increased from zero to one.
So yeah, those are
data breakpoints and searching.
So data breakpoints again are
extremely useful for many scenarios.
In that case, I just wanted to
hone in on a specific object.
So it's great for that, especially
in contrast to if
you were to just set
a breakpoint on that property setter
where multiple objects
could be accessing that,
and maybe you don't want that.
>> Yeah.
>> It's also good if you have
a global variable
that's being accessed
across multiple files and things and
you don't know where
it's being modified,
and you can use that for this.
>> Yeah.
>> Or maybe you just inherited one of
your teammate's pieces of code
and you're unfamiliar with it,
but there's something
going on in it that's
causing a property to change
without your knowledge.
So then you can use
a data breakpoint to hunt it
down instead of having to play,
"Well, maybe it's in this area.
I don't know what
this piece of code does."
>> Yeah.
>> Let's try it.
>> Cool.
>> This type of deal. All right.
So from there, there's one last bug
that I want to deal with.
It's not so much of a bug, so much as
an added addition on my part.
But the line right
below read one times,
it tells me when I last
completed the book,
but I have a tendency to
read multiple books at once,
and can finished several books
in one day as a result,
so I'd like to know also
the exact time that I
finished it as well.
>> Oh, okay.
>> So that's currently not there.
So I want to go into Visual Studio
and see where I can add that.
So I'm going to set a breakpoint
at this line here that
returns that related String
about when I finished the book,
and refresh the page.
Just looking at it at first glance,
there's a lot going on on this line,
I have a nested function call
happening within a parameter
of an outer function call,
and then there's a property value
being fed, it's a lot.
So I want to break down
this line of code and
see what pieces of the String
are coming from where,
just so I have a better
understanding of what's happening.
So the first thing
I want to look into
is the Person.ToString function.
But as it stands now,
if I were to try to use depth into
or step-over or any of those,
there's not really a way to get into
that nested function from there.
>> All right.
>> So I can use step into
specific in order to
choose which of these function calls
I want to go to first.
>> Is that new in 2019?
>> No. This has been around.
Yeah. This is an old one.
>> Yeah. So it's been
around for awhile.
So I can right-click this line,
and I can go to step into specific,
and I'll get a dropdown with all
the different places I can go to.
>> Yeah. We need to add
a feature to Visual Studio where
when you hover over something,
it will tell you when
it first appeared.
>> That would be amazing, if
there is an extension for that.
>> Yeah.
>> It's like, Visual
Studio history extension.
>> Exactly. Yeah. Just for fun.
>> Yeah. So you can pull
your hair out wonder,
''How did I not know
about that seriously?''
>> You can load it over your friends.
>> Oh, man. Yeah. So from there,
I can select person.ToString and
just as if I were to use
the regular step into,
it'll take me into that function.
Yes, so super great.
So this one is pretty
straightforward.
It's just returning the
value of the parameter
that I gave it in which case
it was just my name.
So I'm going to step through
it and then step out.
Then I'm back to this line again.
So from there, now I want to look
into the FinishedToString
method here.
So again, using Step Into Specific,
I'm going to select that one.
Here, I'll be taken to
the FinishedToString method.
I have even more stuff going on here.
I have some string
concatenation going on.
So first, I just like to see what
is the exact return value
with this method?
But normally, in order to do that
because it's not currently set to a
variable at first, I
would think, Oh, great.
Now, I got to stop
debugging and set it to
an arbitrary variable and then
look in the Watch window or something
what that variable could be.
But another way that you can look at
this return value without
having to stop debugging and
do all that is to step to
the end of that function.
You'll notice that in the Locals
as well as the Autos window,
there is a line that has
the return key Word on it,
and that will tell you exactly
what's being returned
by that function.
So that happens by default.
So you don't have to do any other
additional leg work in order to
see the results of something that's
not set to a particular variable.
Another way that you can do this
is also in the Watch window.
So I'm going to add dollar sign
and then ReturnValue,
and then I get that same result.
>> Okay, cool.
>> So the added bonus
about being able
to do that in
the Watch window is that,
I can also add
format specifiers to it,
which are things that allow me to
temporarily view the contents
of the Watch window
in a different light.
So if I wanted to remove the quotes
around the string for instance,
because they're
redundant at this point,
I can add a comma to the item
I have here and I'll get
this dropdown which is new to 2019,
with a list of different
format specifiers I can use.
So instead of having to
memorize the giant table
that you'd have to look up online,
it'll give me some options
right off the bat.
So I'm going to select nq,
which stands for
string with no quotes.
Hit "Enter" in that
will enable it to pass.
>> That's just in the Watch window,
you're not actually
touching the running code.
>> Correct.
>> Okay.
>> I'm not filling with
the code itself at all.
Yeah. So great.
From there, I now want to step
into yet another function,
I have this finished
book string here.
But again, I am
now under scope because I've
reached the end of the function,
so I need to get back to it.
I'm going to use that to
next statement again.
There's several ways you can
use that to next statement.
I can actually drag the execution
arrow up if I wanted to,
instead of holding down the control
key, like I did previously.
So from there once more,
we're going to use
Step Into Specific,
and I'm going to select
FinishedBookString.
Here, I'm being taken to
yet another function with
more string concatenation going on.
So let's say, I wanted to
break down this line of code.
So I can use ReturnValue again.
Again, I'm going to step to
the end of the function.
This time, I have
the final result here, of course.
But if I wanted to break
it down even further,
then I can do that as well
by adding ReturnValue,
I can do ReturnValue1.
Now, give me the result
of this.Title.
If I wanted to get this last
read date thing over here,
then I can also do ReturnValue3,
and that will give me
the value of these two.
>> It's interesting.
>> This also goes for
if you're looking
in the Locals and Autos windows,
it will surely do things like this.
>> So why do that rather than just
if hovered over this .Title,
it shows you that information.
All right. If you hovered
over ToShortDateString,
it shows you that.
>> Yep.
>> You can also add those
to the Watch window.
So when would you list
the value of being able
to specify ReturnValue1,
ReturnValue3?
>> It's just another variation to be
able to look at what's being
returned on top of that,
you're doing it in the Watch window.
You can mess around with
the format specifiers and stuff,
and just keep everything
grouped together.
I like to say organize though.
I'd prefer to just have
all the ReturnValue group together.
>> Okay.
>> So all right.
From there, I have found where I can
add my time-related scenario
because I have
this ToShortDateString function
here that I don't need
in order to show
the full time and the date.
>> Right.
>> From there, I'm going to
continue running my code.
>> That is known as
edit and continue.
>> That it's edit and continue that.
Yeah, that's a magic that
sometimes it works,
sometimes it doesn't.
>> Yeah.
>> This is a scenario where it
should work because if
I refresh the speed.
>> I remember when
that was introduced.
>> Okay.
>> That's amazing.
>> When was it introduced?
Because I think that was interesting.
>> But they told you
then I meet to date
and I had to admit it a while ago.
>> Yep. So we are making-
>> I'm old enough to
remember when that
was introduced the first time.
>> Awesome, yep.
So isn't empty tool when it works,
we are making improvements
on it as we speak however.
>> Cool.
>> So yeah. From there,
I just refreshed the page,
and as you can see,
I now have the time.
That was ReturnValue,
Step Into Specific,
Format Specifiers,
and then Set To Next Statement
made a reprise as well.
>> Cool. So now the app is perfect.
>> Yeah. Now it's absolutely
perfect. There is
nothing wrong with it.
I'm never going to have
any trouble with it ever again.
>> Cool. So over the course
of these two parts,
we've obviously seen some things
that we knew were in
there, learned a lot.
I saw a number of things I
didn't know were in there,
including some things that
have been in there for awhile.
So this has been
great. Thanks so much.
>> Awesome. Thanks for
having me yet again.
>> Hope you guys enjoyed that.
We will see you next time
on Visual Studio Toolbox.
CMake Debugger
hi everyone today I'm going to show you
an exciting new feature in visual studio
for your cmic development my name is
Tina bakunja and I'm a product manager
here on the C plus plus team at
Microsoft focusing on cmake and
cross-platform development we have a new
cmake debugger integrated into Visual
Studio that allows you to debug your
cmic scripts and your cmake list.txt
files let's take a look at how it works
in Visual Studio
alright so now I'm in visual studio and
I have a cmake project open there's a
few different ways I can access the cmic
debugger from this point the first is I
can navigate to the project drop down
and select configure my project with
Scenic debugger this will spin up the
cmake debugger for this project
the next is I can also right-click any
of my cmake list.txt files in the
solution Explorer and the same option
will populate to open the cmake debugger
also if cmic cash generation fails for
any reason there will be a notification
that populates in the solution Explorer
to debug your project with the cmake
debugger
alright so now let's take a look at the
scenic debugger in action what I'll do
is open the cmakelist.txt file that I
want to debug I'm going to open the C
link list of txt file under the test sub
folder in this case
this file includes all of my testing
logic
I can start by setting a breakpoint for
my debugger on a line number and then
running the cmic debugger from the
project drop down
okay I can see that the IDE has entered
the debugging state in the locals window
I can see the state of the target I
defined under the added executable
command called test instant savior
I can expand to see more information
about this target like that it is using
ninja to generate and then I can scroll
down to verify that the source of this
target is set up properly
now let's watch the first test called
test one and step through the debugger
line by line I can step through this
code like any other debugger in Visual
Studio
I can now view the properties for this
first test that was set called pass
regular expression this can be super
useful as you get into larger cmic
projects as you can view all the state
of these types of variables at a given
point in time
as you can see in the locals window I
can also expand and view the state of
all of my cmake cache variables as I
step through code
I can set watches on variables by
right-clicking and selecting ad watch
these variables will now be watched in
the watch window
you can also navigate over to exception
settings and see the different C make
specific exceptions that you can set
your code to break on for example I'll
set a breakpoint on any warning that is
thrown and you'll see as I click through
my debugger and step through my code
that it will break on the first warning
message
this can be toggled to any other kinds
of Errors you see as well
all right so what do you think the cmake
debugger can allow a lot of insights
into your cmake projects at configure
time and works like any other debugger
would in Visual Studio as you could see
download the latest version of Visual
Studio play around with the cmic
debugger and please let us know your
thoughts we hope this helps you with
your cmake workflows and makes them a
lot more efficient also be sure to check
out the pure virtual C plus conference
on June 6th for more C plus plus content
Co-Creation in the Music Industry
>> We're going to
tell you some stories
about co-creation in
the music industry.
No. We're going to tell you
three stories specifically.
We're going to tell
you about one song,
one album, and some artificial
intelligence technology.
And we're going to tell
you how that one song,
that album, and that technology,
actually grew to yield
five number one singles,
four Grammy's, and
some technology
that is actually used by over a
million musicians
around the world.
And, of course, that
wouldn't be possible
without us all having
a very strong network.
So I truly love and
my guests here truly love
the music industry because
the work that we do in
co-creating actually yields
something really powerful.
For us, it yields taking
some ideas and turning them
into a really tangible art form.
Through that process,
we help musicians,
and we help bands,
and artists, realized
their full potential.
And, my favorite piece is we
support an entire ecosystem.
You see, when we have a track or
an artist or an album
that is really exploding,
that supports
the whole ecosystem.
Everybody from
the content creation side,
production, distribution
and consumption,
so you have, songwriters,
producers, audio engineers,
musicians performers,
record labels,
everybody on the artist
and management
side and ultimately when
the artists are successful,
that then yields social and
philanthropic implications
that we can all benefit from.
So I look forward to diving in.
By way of a quick introduction,
my name is Jay LeBoeuf,
I am the executive director of
a nonprofit called
the Real Industry,
and the folks in
the Real Industry is to help
University students understand
how the real world works.
So how we actually create
products in industry,
or how the music industry
actually works and some roles
that they can do there.
I'm also a lecturer
at Stanford University
and I am hoping you
can give a very warm
welcome to my three guests.
Please welcome Joe London,
Peter Gray, and Greg Mertz.
So Joe is going to start us
off by telling us the story
of the song Star Of The Show.
>> I guess I'll start by just
talking about networking.
I like to think of networking
almost like a puzzle,
where you have
like when you start
a project or you start something
you kind of have
the four corners,
and then, you fill in
the stuff that's kind of easy
and eventually you have
all these like holes.
And it's you really have to
utilize what's around
those to like really fill
them in and kind of get
to the point where
you're trying to go
and so I thought this song is
actually a good
representation of that.
I had been sent
a video of a demo of a song
for the artist Thomas Rhett.
And the video was
a fan film the video of him
at a show playing the song,
months in advance.
It was the only recording
they actually had of
the song and they had sent
me the video and said,
"Hey, we really want
the song produced.
This is the only
recording we have.
Good luck." So I pulled up
open the video and kind of
did what I thought was
the direction that I thought
the song should be going.
And being from Los Angeles
and being more of
a pop producer,
I've kind of taken
the song sonically to
a kind of a pop, country song.
Thomas, being a country artist,
eventually they heard
the initial version
of song and they loved it and
they thought it
could be a single.
But we had some holes in
the thing where it could
the song fit for country radio
or was it a little too pop.
So, eventually bringing in
a bunch of different people,
a good friend of
mine, Julian Bunetta
was an incredible
producer-songwriter.
Basically showing
him the song be like,
"Hey, what do you
think about this?
Do you have any
ideas?" And he loved it
and he has a bunch
of great ideas.
So Julian came in and
then we brought in
an amazing steel guitar player,
named Skip Edwards.
From there, added a bunch of
sliding guitars
that made it really
really cool and really
more in the country land.
From there, we
brought it to one of
Thomas's kind of
main producer collaborators
and nationalist,
a legendary producer, Dann Huff,
and just basically kept like
finding those pieces of
the puzzle and getting closer
and closer to fight like finding
kind of the end goal that
we want to feel the song,
and in basically,
finding all those pieces
we got to the song.
Song came out, and ended up
being a successful
song. So, yeah.
>> Here we look at the-
>> Yes, I think we have
the initial video of the demo
that they sent to me,
which was kind of terrifying
for me. [inaudible]
[MUSIC]
>> Yes, I think you
can kind of see from
the initial start
of just that real
basic acoustic to go through
the processes of
utilizing the network,
that I had in the networks
that my co-producers
had in the song.
We were able to like really take
it to the next level
of production,
where it feels a little bit
pop and innovative
but also feels kind of country
at the same time I think.
I think we got to a cool spot.
>> Fantastic. Nice work.
That was a fantastic example of
co-creation within
songwriting and production.
>> Thank you. Yeah.
>> So I'd like to,
I told you I'm going
to give you one song,
an album and some technology.
So let's talk about
an album. Peter, welcome.
>> Thank you.
>> And before we watch
that beautiful video again.
Actually, I was
hoping you tell us
a little bit about
The Heist kind of set,
set the scene for
why this is the album
that we're talking about.
>> We'll do and following
on what Joe said,
"It's important to
know that this is
the creative epicenter
how it really starts."
Right? And it is.
It's a team sport as
much as you want it
to just be an artist
or the people who
are really around
the nucleus once it
leaves your hands, right?
And the team of producers and
the people that
you put around it,
then it requires an army of
people around the world to
really be able to
deliver an artist and
their music to the top
of the charts globally.
In that case, the reason we're
talking about Macklemore,
which is a great source
of pride for me being
a part of a big major label
Warner Brothers Records.
There was this artist
Macklemore,
Ben Haggerty, who had been
on the scene for
a number of years,
he had been very successful as
an independent artist
selling out
tours here in the United States
and around the world.
And it gotten to
a point in his career
where he recognized
that something
was missing about being able to
get kind of paint
the world so to speak,
and really finish
his breakthrough
and it was getting
a song on the radio.
And getting a song on the radio
was traditionally something that
major labels have a bit of
a media stranglehold on.
Others can try to
do it occasionally,
they sneak through and
it's exciting when they do,
but certainly, much more of
an exception to the rule.
And wanting to maintain
his independence
and not appear to be
saddled up with the man
and working with
a record company which
we certainly understood.
We took a very discrete
approach to saying,
"Hey, why don't
you let us help?"
You don't need our help
putting your music on Spotify,
or on Apple Music or iTunes.
You have your own
independent publicist,
you don't need any help making
videos you do
a great job of that,
you don't need us to take
pictures for you but,
you do need a song on the radio
we know how to do
it and we can help.
So we made a very quiet,
very low key deal
and we maintained
our discretion and
we always promised to
stay in the shadows
which we have.
And the result of that kind of
co-creation and
collaboration that we have,
went on to a number of
big hit singles and
as Jay mentioned,
seven Grammy nominations
and four wins,
and now an album
that's sold north of
five million copies with
tens of millions of singles,
and hundreds of millions
if not billions of
streams at this point,
and really put Ben
and Ryan on the map
as a massive
breakthrough artist.
It was his vision of
knowing what he wanted.
Our understanding of recognizing
an ability to do it in
a fairly different way,
typically labels would make
a lot of noise about
a big breakthrough.
We wanted the world to know
that they had accomplished it.
And in the case of this,
we simply kept her mouth shut.
And as a result,
now we're going into
his third album that will
be out in a couple of weeks,
and we've had a great and
collaborative experience
with a world class artist.
That makes sense?
>> I think, it's
a really fantastic example
of how the capital
and the goodwill,
and the networks that Warner
Brothers Records has built.
It is something that
an artist can come
in and use it to
amplify their work.
Take it to millions
and millions people.
>> Yeah, and someone
mentioned I think in
the last piece too,
I know is a gentleman
who's headed to Detroit.
It's one thing to want
to protect your networks,
it's one thing to
want to protect
in on their relationships.
It's so much better when you
let them rest. You
know what I mean?
And you really share
it with people,
if you're fearful about someone
having a better relationship
with your partner than you are,
then you probably
have some work to do.
If you can maintain
a fearlessness about it,
the opportunities for
explosive growth
particularly in music,
how great would it be
if instead of saying,
"Well, I don't want to
talk to Max Martin."
You called Max Martin and said,
"Hey, we're going to
do this together."
And the next thing,
you were making
more records with him or
each other and there's
just a big explosive opportunity
that people tend to not
want to participate in.
>> Fantastic. Well thank
you Peter. It's really good.
>> My pleasure. Thank you.
>> So, I'll call
it like it is the music
industry is not always
known for being in
the forefront of technology.
In fact, we often resist it.
But our next story,
we're going to talk about Greg,
and how you have actually
led the charge to
discover new technologies and
embrace them within
the industry.
>> Yes, absolutely. Hi everyone.
Thank you Jay for inviting
me into the Microsoft team,
and this is quite a
special subject matter,
really as I look at it,
to connect Burning Man
to the powerhouse of
Shenzhen back to us.
Macklemore is quite an
interesting sort of series of
unrelated topics
that come together
in the context of networking,
and it's near and dear to me
although I'm sort of
learning more about
how I've adapted
in this universe,
in a way that is relevant
for the subject matter.
Network, the kind of things I've
been hearing about today
are so central to my life.
I'm very active in a lot of
civic contexts
politically and use
very powerful networks to
drive opportunity there when
it comes to political
activity and activism.
I do it in the international
global conservation movement,
where I'm very active
in networks that drive
conservation in
Africa and elsewhere.
I bring it heavily into
my field of career,
vocational field which is
the music industry
where I built a deep,
strong, and tight network.
That cohesive network
that we talk about through
many years of productive work
on behalf of artists,
through the creative cycle into
release and global impact.
But then, being
a part of an industry
that was being
disrupted so heavily,
and working with artists along
that period of disruption,
is feeling like we would
benefit by reaching outside
of our cohesive networks
which by the way,
we're working beautifully
for many years so we
didn't have to adapt
in the same way.
But I started to see
an opportunity to bring
some leadership to this area,
working in conjunction with
a very enlightened leader
within the Warner Music Group,
Cameron Strang,
who was focused as
well on how we can expand
innovation and our networks.
That led me to actually
have the privilege and
opportunity to go build out
new networks for example,
starting with
Stanford University,
where I built a program
with Warner and we did
a massive online open course,
where we brought many,
many famous artists to the table
reached thousands
of people globally
and performed creative tasks
that the outcome of that.
And then, I took
that network within Stanford,
and as we were pursuing more
on the technology front,
how could we get in
front of technology,
where could we participate
earlier in the value chain.
I sought out Jay in
his adjunct role at Stanford,
and he was teaching a course
on music information retrieval.
Which I thought was
important category for
development of the music industry.
Through that, was able
to reach networks that
brought us to this company
called Landor,
at a time when it
had three employees.
And this was changing the face
to machine learning of
the music production cycle
through mastering.
What I did was,
I was able to sell that concept
to the Warner leadership.
We invested in that company
and then serving
as a bridge myself
through my consultancy.
I was able to work
deeply with Landor,
to drive business development
strategies globally.
And I have watched
that company go from
three employees to 90 employees.
It has millions of
dollars in revenue.
It is present in
190 countries and it is
translated across 15 languages.
There is a very robust
and strong community
of a million and a half users.
And, it's really shaking up in
very exciting ways
disrupting frankly.
So, we're in on the disruption
early in the value chain,
we're not waiting for
it to happen to us.
It's creating tremendous
economies of scale and
it's freaking cool, right?
That you can do this
with your mobile phone.
I mean the ecosystem
is mind-blowing.
So I love being part of
a music industry that is jumping
into that as opposed
to waiting for
it to hit us. You
know what I mean?
And by the way, it's not
always an easy transition.
We have professionals
who are afraid of this,
but then they start to
see that it can co-exist.
And frankly, they can
adapt their skill sets
to manage in this
changing environment,
bring a little of
that Shenzhen mindset
to what we're doing.
So, that's the Landor's
story which I'm,
one of several I'm
participating in,
where I found early tech,
brought some investment,
brought some
strategic leadership,
and now we're seeing
dramatic expansion globally.
Landor is one powerful example
that unites Jay and I,
and it's been a privilege
working with these guys and
I continue to work
deeply with them.
We've brought them across
the music business.
It's not that Warner
is controlling
that network and maintaining
it as a closed environment.
We invest but we've driven
adoption through
Universal Music Group,
Disney, ASCAP across
the music landscape.
So I think it's
quite a compelling story of
that type of broadening
of networks and how
that can be powerful.
>> Fantastic. Thank you
Greg, that was great. So, I
hope I delivered as promised.
Again, to really
bring it all together.
We all depend on
the cohesive networks that
we have. They are very tight.
We make very intimate
artful, personal,
emotional decisions together
and we count on each other,
but we all have to
keep opening it up.
So whether it's Joe,
if you want to write
for a new genre you
haven't written before,
you need to reach
out to a new network.
Build, trust, credibility,
demonstrate some goodwill,
and then be welcomed in.
Whether it's Macklemore saying,
I need extra distribution,
I need extra help,
opening up reaching out
and then Peter being
so generous with
your contacts and creation's
connections that helps out.
And Greg same thing you've kind
of masterfully reached out,
opened up huge parts of
the music industry worlds to
mean fellow tech
industry folks but,
then now the tech
industry is able to
benefit from all the
great music connections.
So, I want to thank you all
for giving so much
and being here today,
and also again, a huge
thanks to Microsoft
for supporting us and
creating this great event.
>> Thanks for having us.
