Site hosted by Angelfire.com: Build your free website today!

Debugger Tutorial
Home Common Buttons Debugger in Action Strategies Feedback

 

Welcome to the Debugger Tutorial web site!

Netscape users: change font color to white.

This site is designed to teach users, of Microsoft Visual C++, how to use the debugger in troubleshooting their programs.  Knowledge of C++ and basic knowledge of using Windows is assumed. Actually this could also be used for Visual Basic 6 as well as other visual programming environments.

MS Visual C++ has many debugging tools that are designed to help the programmer find logic errors through the use of stepping through the program, one line at a time, and watching the values of variables.  There are also some strategies to use when debugging your program and they will also be discussed.

I'm now a Computer Science Graduate (MSIT) student at the University of Texas - Pan American and these are some of my techniques that I use to troubleshoot my programs.   In this tutorial I'll use a simple program that creates an array of integers and another array of characters.  There are some errors in the the procedures.  They are simple array bounds errors that occur with students (and yes, me too).

To start off take a look the the screen capture below.  You will notice three areas highlighted in red.  The top red box highlights the basic Build Minibar.  The icons from left to right are Compile, Build, Stop Build, Run, Go and Breakpoint.  The red circle on the left indicates that a breakpoint has been places on that line (red dot).  And the box on the sample.cppright highlights the Debugger Toolbar.  I placed that toolbar there so that it can be seen.   Normally, the toolbar pops up as a floating toolbar when the Debugger is started.   So, when the Go button is pressed the program will run until the breakpoint is reached and then stop.  At that time, you can check on variables or step through the program one line at a time. 

This page is just to get you started, take a look at the Common Buttons link to review the buttons that are commonly used while debugging.  When finished with that, take a look at the Debugger in Action and finally Strategies.


Linux users, that use Kdevelop as their IDE, has the same functionality in its debugger (just different icons).  That means that the same strategies can also be applied.  I'm sure that KDEStudio has the same thing but I'm not sure, I'll have to check.

This web page is a work in progress so, if you find any errors or have suggestions for improvements drop me a line.

 


Site created and maintained by Ray Garza.
This page was last updated on 04/06/01.
Send Email