Using the Java Debugger

This page is generally correct but needs some work before it will be accessible to a large number of CS5 students. If you've had experience using a debugger in the past, the page might be fine as is.

The Integrated Development Environments (IDEs) we use in this class either don't handle the debugger at all (JCreator) or don't handle it when input from the keyboard is needed (Xcode). Since we only write console applications in CS5, if you wish to use the debugger on a program that receives standard input, some magic is needed.

Using the Debugger with Command Line Applications with Standard I/O

Open two command windows:

Note: If you're running this from your dorm computer and it is a PC, you'll need to make sure that your path is properly set (as described here).

Debugging the program:

Good Luck, Have Fun, and ask questions if you have any!