CS210 Lab: Introduction to Visual C++--Debugger Tips

In this lab example, we used the Step Over to examine the loop.  What will happen if we use Step In? Well, Step In will examine the program one line a time and it will go into every function if a function is called.  Therefore, if we use Step In to examine the loop with the cout and cin statements, we would have stepped into the  cout and cin system functions. this is not what we want. So when you debug your program, whenever you encounter the system functions, which do not need to be debugged, use Step Over instead of Step In. 

This is one of the tricky part of the debugging process which could get you into trouble.  You will get into even more troubles if you do not know what you are doing.  The following are some surprises, how they happened, and how to deal with them.

If all else fails, you can always select Debug --> Restart to start your program over again, or select Debug --> Stop Debugging to quit execution of your program and stop debugging altogether.

Back to the Introduction to Visual C++ Lab click here

CS Dept Home Page
CS Dept Class Files
CS210 Class Files

Copyright: Department of Computer Science, University of Regina.