A launch configuration is a mechanism for defining and saving different
workbench configurations that can be launched separately. You can use launch
configurations for launching debug sessions.
To create a launch configuration that will allow you to debug
a Web object that is running on a WebSphere Application Server, do the following:
- Start WebSphere Application Server in debug mode.
- In a workbench perspective that offers the launch/debug/run action
set (such as the Debug perspective), perform one of the following tasks:
- Select Run > Debug from the workbench menu
bar to open the Debug launch configurations dialog
box.
- Click the down arrow next to the workbench toolbar Debug push
button and choose Debug from the list. This will open
the Debug launch configurations dialog box.
- In the Debug launch configurations dialog
box, do one of the following:
- Select the WebSphere Application Server node and
click New launch configuration.
- Right-click the WebSphere Application Server node
and select New from the pop-up menu.
- Double-click the WebSphere Application Server node.
- In the Name field, enter a name of your
choice for the configuration that you are creating.
- Select the Connect tab to bring it to the
foreground.
- In the Connect tab Project field,
enter the name of the project that contains the source for the application
that you wish to debug. The project must be a Java project or a project with
a Java nature.
Rather than enter a project name in the Project field,
you can browse for the project by clicking Browse.
Completion
of this field is mandatory.
- In the IBM WebSphere Server type field,
select the version of WebSphere Application Server that the debugger will
attach to.
- In the Host name field, enter the host
name or IP address of the machine on which the application server and application
are running. If these are running on the same machine as the workbench, accept
the default localhost value.
- In the JVM debug port field, enter the
port number that the WebSphere Application Server JVM is listening on. The
default value of this field is typically 7777.
- If you are creating a launch configuration for a Java application
that you are adding JavaScript to and developing in the Bean Scripting Framework,
select the Enable JavaScript debugging check box and
then enter the Bean Scripting Framework debug port in the BSF
Debug Port field. The default value of this field is 4444. If
the Enable JavaScript debugging check box is not selected,
JavaScript debugging will not be enabled and the BSF Debug Port field
will be unavailable.
Note: This option is only available when the IBM
WebSphere Server type is set to WebSphere v5 Server.
- The Allow termination of JVM radio button
is a toggle that determines whether the Terminate command
is enabled in the debugger. Select this option if you want to be able to terminate
the JVM to which you are connecting.
Note: If this option is selected
and you choose the Terminate command, the application
server will terminate.
- If the source for the Web object that you are debugging resides
outside of the project specified in the Connect page,
select the Source tab to bring it to the foreground.
- The Source Lookup Path defaults to the
project path and the location of the Java run time. To change the Source
Lookup Path, deselect the Use default source lookup
path check box and you can modify the source lookup path as follows:
- To set the order of existing entries, select a source location and click
Up or Down.
- To remove an existing entry, select a source location and click Remove.
- To add a source location, click Add Projects,
Add JARs, or Add External JARs,
as desired, and complete the resulting selection dialog.
- For advanced source location options, such as adding folders and containers
to search, click Advanced and complete the resulting
dialog.
- Select the Common tab to bring it to the
foreground. You can do the following in the Common page:
- If you want the launch configuration to be stored locally and available
for a single user, ensure that the Local radio button
is selected. If the launch configuration is to be stored as a file in the
workspace and shared in a repository for team use, select the Shared radio
button and enter the project location where you wish the launch configuration
to be stored in the Location of shared configuration field.
Alternatively, you may browse for the project.
- In the Perspective to switch to or open when launched in group,
choose the perspective that you would like to have opened after the launch.
This selection is made in the Debug mode field drop-down
box.
- If you would like the launch configuration to appear as a favorite debug
configuration in the Debug push button favorites menu
or the Debug menu Debug History list,
select the Debug check box.
- If all information mandatory to the launch configuration has been
provided, the Debug and Apply push
buttons will be enabled. Clicking Apply will save
the launch configuration, at which point you can choose to close the dialog
box without launching the debug session or you can click Debug to
launch a debug session using the new launch configuration. If you click Debug,
any changes to the launch configuration will be saved and a debug session
will be launched.
After you have saved a debug launch configuration,
you may edit it. For further information about editing debug launch configurations,
see the related task below.
Tip: If you have
not yet saved launch configuration settings and if you have made entries in
the launch configuration settings that you would like to remove or change,
clicking Revert will remove all changes that you have
made.
- If information mandatory to the launch configuration has not been
provided or if there are errors in the information that you have provided,
messages at the top of the dialog box will indicate what is missing.
- When you are finished working in the dialog box, click Close to
exit it.
Once you have launched a debug session with the debug adapter,
you will need to launch the Web object by entering its URL in a browser.