COM SCI 31 Lecture Notes - Lecture 1: Quadratic Equation, Call Stack, Microsoft Visual Studio
Document Summary
Thursday 8:30 to 11:30 am (also on the class website) It runs step by step to check for errors. You can check variable values at any step in the program. See the call stack (which function you are currently in) Console window disappears as soon as the program finishes. Pause the program to examine variables and stacks set at least one before you start running the debugger. You can set more as you run the debugger over time. #include int myfunction(){ int main() { int a = myfunction(); //add a breakpoint here to check the values before the line begins. You can examine variable values by hovering over them during a pause. Tips: don"t put too much code into a single function: this makes it very difficult to debug. If you feel that a function is getting too long, split it up into smaller functions.