You debug a packaged custom Java control by creating a separate project as a test project. You then build your control project. By specifying certain debugger settings for your control project you can set break points in your control source code (including IDE extensions such as attribute validation dialogs and insert wizards), then run it as you would other source code.
When debugging, you are running two instances of the WebLogic Workshop IDE -- a debugging instance containing your control source with breakpoints, and a client instance containing a project in which you're testing the built control. The client instance is started for you when you begin debugging if you have specified the correct debugging properties in your control project.
Note that as you use the debugger, stepping through your control code with both instances of the IDE open, the IDE will not automatically switch between instances as the code executes. For example, if you have reached a point in the code where the client instance is displaying a prompt dialog, you may need to switch from the debugging instance to the client instance in order to respond to it and continue debugging.
Keep in mind that you can write debugging information in messages to a log file. See the EditorContext interface for its getLogPrintStream method. By default, this method writes to the ide.log file in the workshop folder of your WebLogic Server installation.
For an example of debugger settings, see the project properties for the ControlFeatures project included in the ControlDevKit sample application.
When setting up for debugging, begin by ensuring that the properties for the control project you're debugging specify the following values on the Debugger pane.
To Specify IDE Extension Debugger Settings
Option | Value |
Create new process | Selected |
Attach to process | Cleared |
Main class | workshop.core.Workshop |
Parameters | <Empty> |
VM parameters |
When debugging with 8.1 GA:
When debugging with 8.1 SP2 and later:
|
Home directory | <WebLogic Workshop home directory — automatically set by the installer> |
Application classpath | <Must include wlw-ide.jar — automatically set by the installer> |
Automatically append Library JARs | Selected |
Automatically append server classpath | Selected |
Smart debugging | Selected |
Build before debugging | Selected |
Pause all threads after stepping | Cleared |