Debugger

Introduction

In this lab, you will explore the Debugger in Eclipse. If you already use the Eclipse debugger, this lab may provide you with more information. If you are new to Eclipse, make sure to watch the video in the Resources section below to get oriented to the vocabulary and basic function of the debugger.

Resources

Video: Norm Krumpe’s Debugger Tutorial (~15 min) covers basic vocabulary and explains how to track variables in different areas in the Eclipse screen, the difference between step-in and step-out, etc.

Beginner’s Guide to Quick Start Debugging is a written reference with screenshots that explains how to get started and can serve as reminders of how things work as you debug.

Estimator.exp has the expected output of the Estimator for reference.

Tips for Using the Debugger Effectively

Eclipse Debug Settings

If you haven’t already, update your Eclipse settings to prevent stepping into imported libraries:

Debugging

  1. Create a project with the following two classes.
  2. Estimator.java
    Bus.java

  3. Debug the code (there are three mistakes). There is nothing wrong with the overall algorithm.
  4. Submit your code to AutoLab when you are done. You should have zero errors. Note this score is out of 9. Make sure you have your name in your code instead of YOUR NAME HERE to get the extra point.