So coded your application and you have no errors but when you run it has an error or runs not like you expected.
This is a Logical Error where it debugging skills help.
The most important one is the use of breakpoints, these stop the execution of the program and allows you examine things to are occurring within your program;-
like the contents of variable
The stack.
To examine the contents of a variable you can hover over the variable name and a box appears with contents, but when you move the mouse it disappears.
For something a little more permanent you can right-click over the variable and add a watch, this allow you to view the contents as you step through the code.
Stepping Through Your Code
To Step Through your code there are three types of stepping
Step InTo F8 where the stepping, steps into subroutines, function, methods etc.
Step Over Shift + F8 where the stepping steps overs subroutines, function, methods etc.
Step Out Ctrl + Shift + F8 where the stepping, steps out of the current subroutines, function, methods etc.
On to the next code line directly over the call.
The Stack Ctrl + L
Another important tool is the stack visualizer, where you can see the depth of the function call.
Click on a level and the debugger takes to where in your code the function call was made.
[External Code] is code that was used by your program but you are unable access it because it likely to be OS / CLR operation.
These simple skills will help you become code debugging code-ninja







MultiQuote












|