Debugging commands
Examining some of the more commonly used debugging commands and shortcuts will make debugging the code much simpler:
Step Over
(F8): This command executes the code one statement at a time. If a method is encountered, do not enter into that code.Step Into
(F7): This command executes the code one statement at a time. If a method is encountered, enter into the method's code, and execute the code one line at a time.Run To Cursor
(F4): This command executes the code until the current position of the cursor is reached.Stop
(Ctrl + F4): This command stops the execution of the code and exits the debugger.Evaluate
/Modify
(Ctrl + F7): This command shows the current result of an expression and modifies that expression, evaluates it, and shows the result.Inspect
(Alt + F5): This command shows the type and value of a variable.
Since an age calculation is what this function is to perform, double-click on the Age
variable to highlight it, and add it to the debug inspector by using...