Writing a program for debugging

You can make your programs easier to debug by following these simple guidelines:

If you use javac to compile your code for debugging, you can set breakpoints and step through your source code without using any compiler options. However, if you want to examine local, class instance and static variables while debugging, use the -g compiler option. For a complete list of compiler options, refer to documentation provided with the JDK.

Terms of use | Feedback
(C) Copyright IBM Corporation 2002, 2005. All Rights Reserved.