Program 2

The Debug Perspective in Eclipse

ICS-31: Introduction to Programming


Introduction This "programming" assignment is not a "programming" assignment at all; it is designed to ensure that you know how to use the Debug perspective in Eclipse. Understanding the debugger, and how to operate it, is closely coupled with understanding how Python executes statements. We can use the debugger to help us understand better how Python executes statements, and to help us locate errors in our statements.

Finally, read and follow these instructions carefully. It would be an excellent idea to print a copy of this web page, read through it, and highlight any details that you think are important (and might forget as you are working on the assignment) or that you are confused about. Some students lose points for failing to follow directions properly; this is a problem that gets worse during the quarter, so starting out by doing the "right thing" in this assignment is an excellent idea. If you have any questions about these instructions, for example, if you think they are in error, or just confusing, please post on the appropriate MessageBoard Forum; and make sure you examine the posts from other students.


Using the Debug Perspective Read the document that is a tutorial the Eclipse Debug Perspective and use the debugger to answer a series of seven questions about a program that plays the dice game craps. So, you are not using the debugger to fix a wrong program, but instead are using it to monitor a correct program and get information about when certain events happen in the program.

  • Read pages 1-11 and then practice using the debugger by solving all the problems at the bottom of page 11. The solutions are given on page 12...but answer each question before you check its solution, otherwise you will not have exercised your debugging muscles in preparation for solving the problems in the craps program
  • Solve the problem stated on page 13. Solve each more than once: if you aren't getting the same answers every time, you did not correctly follow the directions on how to setup the craps.py script; re-read them. Write your answers in the following Quiz.