Debugging a visual Java bean or application

If you want to see the Java processes and step through the code for your Java visual class while you are running it, you can choose the debug options.

Similar to the run commands, the debug commands start a virtual machine and create and use launch configurations. However, by selecting the debug menu options when running, you gain the added benefits of the Debug perspective.
  1. Open your visual Java class in the visual editor.
  2. Switch to the Debug perspective by clickingWindow > Open Perspective > Debug from the main menu.
  3. From the main menu, select one of the following commands:
    • Run > Debug As > Java Application if your class has a public static void main(String[]) method.
    • Run > Debug As > Java bean if your class has no main method.
    If you did not switch to the Debug perspective, the launch configuration will automatically open the Debug perspective.
The Debug perspective displays the Java threads and processes that you can work with. You can use the standard Debug perspective options to step through your code using breakpoints.
Related concepts
Java bean exceptions
Advanced options for debugging Java beans
Related tasks
Running your visual class as a Java bean or application
Configuring options for running a Java bean or application
Testing and deploying applets

(C) Copyright IBM Corporation 1999, 2004. All Rights Reserved.