CM10135 / Programming II:   Tutorial 3


This is an apparently-optional-but-actually-quite-important-because-it's-so-useful tutorial.  You may want to work on this even (or especially!) if you are stuck on CW1.

There are two objects of this tutorial:

What to do:

  1. Dig out your code from tutorial 2.
    1. You can use your CW1 code if you like, if enough of it is written, but it's easier to get a real feel for debugging on a program that's mostly complete.  (Anyway, you are using some of your tutorial 2 code for CW2!)
  2. You may just want to go through your code as it stands (especially if it doesn't work), or you may want to ask someone else in the lab to introduce a bug into it, & then see how fast you can find it.  (not just a sytnax bug! change a parameter value on a loop or something.)
  3. The debugger I recommend using is eclipse --- it has become quite a standard and you are likely to use it  at a job in industry or academia.  Also, there are already excellent tutorials on using eclipse so I don't have to write one.  Here are two:
    1. So have a look at Debugging a Java Program with Eclipse from developer.com,
    2. or Debugging with the Eclipse Platform from IBM.
  4. Probably the IBM one is better!


page author: Joanna Bryson
8 February 2007