Hello and welcome.
In this lecture we are going to learn how to trouble shoot the arrows you get.
We are compiling your code so this is the code from our program we created.
I'm going to deliberately cause some errors here so that we can learn how to troubleshoot it.
For example here this line of code here.
This code here belongs to this block of code.
But what I'm gonna do I'm going to place it in here.
In between here and see what happens.
So I'll just copy
and come here and paste it in there.
All right.
Just in then the ambit wherever you get red squiggly lines.
It means the editor is not happy about some place complaining already you can see the squiggly lines
make meat.
It's not happy because he knows that death should not be there.
It should come on the here.
So if we compile this now.
So anyway you see that squiggly line that should be a sign an indicator there's something wrong.
If I try to compile this now it would give me an error she tells you say there were build errors.
Would you like to continue and run the last successful build which is the last one.
I'll say no.
And then it will then tell me oh my God.
So it's giving me a load of arrows.
OK.
Well we've You got invalid token.
That means your code is somewhere it shouldn't be.
OK.
So look out for that is giving me the line number sir line 16 which is here which he's kind of like
correct.
Say if I look on line sixteen I can see what the what the editor this code what the Visual Studio is
complaining about.
So I'll just relocate this cut and place it back here where it should belong.
It belongs in this block of code each curly braces represents a block of code.
All right.
So notice well time you get the yellow stripe here.
It means you haven't saved something.
So click on these folder here and save.
So it's all turn green.
I'm going to introduce another deliberate error.
I'm going to take away the semicolon Semicolons are very important and it indicates where your code.
And as you can see there's a red squiggly lines here indicates that it's not happy about something.
So I'm going to run it anyway try and compiled by clicking start and it will give me a build error saying
there were arrows in the build with our light to continue our say no H would not tell me they get told
told me Here give me a clue that on line 13 ways the line 13.
This is line 13.
It is spot on their line 13 is telling me that is is expecting a semicolon asking where is it.
I'm expecting this.
So he called and that's what he's saying.
And it tells me the name of the project the file program which is this line where the error occurs sometime.
The line where the error cause may not exactly be spot on but you'll be near about.
But in some cases it is spot on.
Here you can see it is definitely spot on.
So you can also see the sign with the squiggly line that's I just come here and introduce the semicolon
and click start big things should compile.
See my code as compiled.
So while the code is running you get a memory management here which tells you how the memory is being
used by the application.
So I just click on X to end the application and the memory thing goes away.
So that's basically how you can troubleshoot errors in your code sometimes.
Is easy to or you can make mistakes live out simple things like semicolon and other bits and pieces
you can normally get a clue because there be red squiggly lines and you can tell that there's something
quite not right with a code but when you try to build it and you say no to the build it will display
the arrows and give you a clue as to what line of code contains the arrow.
So that is it for this lecture and this lecture I just introduce you to some basic troubleshooting concept
for Visual Studio.
Thanks for watching.
I'm by for their.