Using the Jython debugger launch configuration

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.

You can create a launch configuration for launching a Jython script debug session or, when you choose a Navigator view Debug action for Jython script, a launch configuration is created for you. In either case, follow these steps which go over launch configuration tabs in detail:

  1. Go to a workbench perspective that offers the launch/debug/run action set (such as the Debug perspective) and 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.

    If you are using a Navigator view Debug action, the launch configuration will be created for you and you can skip this and the next step.

  2. In the Debug launch configurations dialog box, perform one of the following tasks:
    • Select the WebSphere Administrative Script node and click the New launch configuration icon.
    • Right-click the WebSphere Administrative Script node and select New from the pop-up menu.
    • Double-click the WebSphere Administrative Script node.
  3. In the Name field, enter a name of your choice for the configuration that you are creating.
  4. Select the Script tab to bring it to the foreground.
  5. In the Administrative Script field, specify the path and script file that you want to debug (Jython script files require the file extension .py, .PY, .jy, or .JY). Alternatively, you can browse for the file in your workspace or on your file system using the Workspace and File System push buttons. The Variables push button has no effect when used with the Jython debugger.
    Note: It is recommended that you import your Jython scripts to a workbench project and then debug the file from your workspace. If you debug script that is in your file system and not in a workbench project, set breakpoints will not display in the editor. To be able to see all breakpoint indicators, debug script that is in a workbench project.
  6. In the Scripting runtime field, WebSphere Application Server v6.1 must be selected. If the WebSphere Application Server v6.1 run time does not exist, you can create one by clicking the Scripting runtime field New push button. In the New Server Runtime dialog box, select WebSphere Application Server v6.1 under the IBM node and then click Next. In the WebSphere Runtime page, specify or browse for the location of the WebSphere Application Server v6.1 run time on your local machine.
  7. In the WebSphere profile pull down list, select a profile that belongs to the WebSphere Application Server run time environment. A profile is the set of files that define the run time environment. This selected profile contains the configurations to start WebSphere Application Server. If you select the (Unspecified) option, the tooling will choose the profile who is assigned the default role.
  8. In the wsadmin arguments field, you can optionally specify advanced command-line invocation syntax for the WebSphere Administrative (wsadmin) scripting client. For example, if you debug a WebSphere Application Server running on a remote machine, you can enter -host host_name -port port_number in the wsadmin arguments field. For information about wsadmin parameters, see the WebSphere Application Server online documentation.
  9. The settings in the Security section of the launch configuration must match the security settings you choose when you install WebSphere Application Server.
  10. Select and complete the Arguments tab if you want to specify the program and virtual machine arguments for the launch configuration. You can also specify the working directory in this page (the directory that the Jython script will be launched from).
  11. Select and complete the Classpath tab if you want to specify the classpath for the launch associated with this launch configuration.
  12. Modifications made in the Source tab have no effect on the Jython debugger. To allow the debugger to find source, ensure that the source is in your workspace or, if you chose to debug administrative script that is located in your file system, ensure that the source is located in the location specified in the Script tab.
  13. Select and complete the Environment tab if you want to create and configure the environment variables that will be passed into the launch configuration when it is executed.
  14. Select the Common tab to bring it to the foreground. You can perform these tasks in the Common page:
    • If you want the launch configuration to be stored locally and available for a single user, ensure that the Local file 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 file radio button and enter a location to save the launch configuration in. Alternatively, you can browse for the location.
    • If you want the launch configuration to be displayed as a favorite debug configuration in the Debug push button favorites menu or the Debug menu Debug History list, select the Debug check box.
    • In the Console Encoding section, indicate the character encoding that you want the Console view to use. For example, if you want the view to display a language other than English, you may want to change the encoding.
    • In the Standard Input and Output section, you indicate the location of the Console view input and output.
    • To run the launch configuration in the background, select the Launch in background check box.
  15. If all information mandatory to the launch configuration has been provided, the Debug push button will be enabled - otherwise, a message is displayed at the top of the launch configuration dialog box to tell you which parameters are missing. If you change any settings in a saved launch configuration (or in a launch configuration that has been created automatically when you choose a Navigator view Debug action for Jython script), the Apply push button 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 can edit it. For further information about editing debug launch configurations, see the related task.

    Tip: If you have not yet saved launch configuration settings and if you have made entries in the launch configuration settings that you want to remove or change, clicking Revert will remove all changes that you have made.
  16. 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.
  17. When you are finished working in the dialog box, click Close to exit it without launching a debug session.
Related tasks
Starting a debug session
Creating new launch configurations from existing launch configurations
Editing launch configurations
Removing launch configurations

Feedback