Graphical Java IDEs allow breakpoints to be set visually, such as by clicking on a line of source code (which then turns red to indicate it is a breakpoint), and to change the value of variables during program execution. What others features that currently in your debugger would be useful to you?
Use the Java Debugger to Determine the Causes of Errors
Although the Java Virtual Machine frees programmers from many low-level tasks like garbage collection, it can't protect them from mistakes in design and logic. This article explores the Java Debugger, which you can use to trace through a running program and determine the causes of any errors.
by David M. Williams
January 17, 2003
Debugging is an art that every successful programmer needs to master sooner rather than later. The sad truth is that program bugs appear almost as soon as you start coding. Although a Java compiler always will detect syntax errors, often code that is syntactically correct is not logically correct. These sorts of problems may require the help of a debugger.
Sun's Java Development Kit (JDK) includes a debugger called JDB (Java Debugger), a command-line application under which you can execute the programs you need to inspect. With JDB, you can inspect variables while a program is running, set breakpoints to halt the execution of a program at a certain point, and execute code line by line (known as single-stepping). You can see just how the contents of variables change after each statement of program code, and you can precisely trace the execution of a program--even as it branches to other functions or iterates through loops.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!