Visual C++
Debugger Lab
To be done individually
You can, of course, assist each other with the lab, but we do want each person to
go through the steps on his/her PC.
Main Steps to be Done
- Do the debugger practice lab found on the
Compiler Considerations page. However,
use the file DebugArray.cpp instead of the one given
in the practice lab. (The DebugArray.cpp file already has the syntax errors fixed
for you. This will save you some time.)
Note that there are separate directions for Visual C++ 6.0 and Visual C++ .NET.
Choose the one that you wish to work with. Do not worry too much about finding
and fixing the logic error in this example, though if you can find and fix it,
that is great! Just get used to stepping through
lines of code and looking at the intermediate values of variables with the debugger.
- Also run the debugger on the program Debugger.cpp.
Set up a project for it and copy in the code. Make sure that the new project is the
active (startup) project. Then use the debugger to trace through some of the code.
In particular, expand the + in front of some of the pointer variables to see the
data that they point to. You should be able to use the debugger to traverse the
nodes in the list.
There is nothing to hand in. If in doubt as to whether you have learned enough of the
debugger, show the instructor what you have done.
Maintained by: Br. David Carlson
Last updated: 08/16/2003