Debug using the method below that suits the developed Java application. The [Debug Configurations] dialog box can be opened from the workbench menu bar by selecting [Run] > [Debug Configurations].
Use the [Java Application] launch configuration.
If debugging a created Java application, use the Java application launch configuration. In the [Debug Configurations] dialog box, select [Java Application].
Use the [Java Applet] launch configuration.
An applet can be debugged using the Java applet launch configuration. When debug is started, the applet view starts and debug operations can be performed. In the [Debug Configurations] dialog box, select [Java Applet].
Note
When debugging swing-base applets (applets inheriting the javax.swing.JApplet class), the javax.swing.TimerQueue class opens in the class editor when debug ends. To prevent this action, from the workbench menu bar, select [Window] > [Preferences] > [Java] > [Debug] and deselect [Suspend execution on uncaught exceptions].
Use the [Remote Java Application] launch configuration.
An application can be debugged remotely by starting the application in debug mode and using the remote Java application launch configuration. In the [Debug Configurations] dialog box, select [Remote Java Application].
Debugging JavaBeans
If the JavaBeans were generated using the workbench wizard, the main method is provided as the test driver. This is commented out immediately after generation. The JavaBeans can be easily debugged as Java applications by enabling the main method.
Debugging with applet displayed in a browser
To perform debugging by running an applet in Internet Explorer or another browser, use the JBK plug-in and perform remote debugging. The applet can be run in debug mode by adding coding similar to the example below to jbkplugin.properties in the classes folder located in the folder where JBK runtime is installed.
Example:
jbk.plugin.vmoption=-Xrs -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=nnnn
Information
nnnn is the port number used for communication between the debugger and the program being debugged. The value specified in the jbk.plugin.vmoption properties must be set as the port number used on the debugger side for communication during remote debugging.
Point
A created launch configuration does not need to be re-created every time debugging is performed. To perform debugging using the same launch configuration, select the created launch configuration from [Debug Configurations], and then click [Debug] to start debugging.