Debugging a WFC Application

   

If you’ve created a Windows Foundation Classes for Java (WFC) application and noticed peculiar behavior when it runs, these procedures will help you debug your application.

Note   The application example for this scenario was built in Creating a WFC Application. If you’d like to create this project to complete the following exercises, do so now.

The application in this scenario accepts a calendar date and converts it to a Julian date. Once the date’s been entered, you’ll set a breakpoint and start debugging the application. You’ll also examine the value of some member variables with the debugger’s windows. Although there may be references to specific code statements in the Julian Date Conversion application, you can substitute code from your application and still find the procedures in this scenario helpful.

After you’ve entered the date you want converted to a Julian date, go to Setting a Breakpoint Before Starting the Debugger to begin the debugging session.

When execution of your application stops on a break point, view current values for your application’s member variables in the Auto, Locals, Watch, and Immediate debug windows. This gives you a snapshot of what’s happening with your program up to the place where it entered break mode.

Now that you’ve had a chance to look at the state of your program up to where it entered break mode, you may want to set another breakpoint, and then continue Stepping Through the Code.

This concludes the scenario for debugging a WFC application. See Basic Debugging Procedures for additional information on using the features of the integrated debugger.