Debugging a job with full prompt

To debug a job with a full prompt of launch parameters, you create a launch configuration for the debugging session.

About this task

To create a launch configuration, do the following:

Procedure

  1. Open the Debug launch configurations dialog box. Instructions for doing this can be found in Starting to debug.
  2. In the left pane of the Debug launch configurations dialog box, right-click the i: Debug Job entry and select New from the pop-up menu.
  3. In the launch configuration Name field, enter a unique name of your choice for the configuration that you are creating.
    Tip: This name will show up in the Debug menu for relaunching.
  4. Select the launch configuration tabs and complete them according to the tables in the sections below:
  5. When all information mandatory to the launch configuration has been provided, the Debug and Apply push buttons are enabled. Click Apply to save the launch configuration to run later, or click Debug to launch a debugging session with the new settings now. You will be prompted to invoke your application in the job that you specified. Once the program is called, the debugging session will launch.

    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.
  6. 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.
  7. To dismiss the dialog without starting a debugging session, click Close.

What to Debug tab

About this task

Select the What to Debug tab to bring it to the foreground. Unless otherwise specified, all fields in this tab must be completed before a debugging session can be started.

Group Settings
Connection In this section you select the name of an existing Remote System connection from the pull down menu. This connection must be for the IBM® i server that contains the job that you want to debug. If the connection has not yet been created, click New to launch a wizard that will allow you to create a new connection.
Job In this section you enter fully qualified information about the job that you want to debug:
  • Name: Enter the name of the job as identified to the system, for example, QPADEV0017.
  • User: Enter the user profile under which the job is running, for example, MYUSER.
  • Number: Enter the system-assigned job number, for example, 001234.

You can use wildcards ('*') in any of these fields and then select Browse to retrieve a subset of the jobs available (active or in the queue) on the IBM i. From this list, you can select the job that you want to debug and its information will be used to fill in the above fields.

Note: You must specify a unique existing job on the IBM i, otherwise an error message will display.
Programs or service programs to be debugged In this section you enter information about the programs and service programs that you will debug. You can specify multiple programs. Click Add to add a program or service program to the list. To debug a running application and stop at the next executable statement, make sure there is no program or service program specified in this section.
  1. Library: In the Add a program or service program dialog, in the Library field, enter the library that contains the program that you want to debug. Valid library name specification information can be found in the related topic below. Select Browse if you want to browse for the library.
  2. Select Program or Service Program and enter the name in the appropriate field. Select Browse if you want to browse a list of the programs or service programs available in the specified library on the IBM i.
  3. Click OK.
Step into If this check box is not selected, the debugger will stop at the first encountered breakpoint. This could be a profile breakpoint (one that you set in a previous debugging session) or a source breakpoint (one that you set in the Debugger editor before starting to debug).

If Step into is selected:

  • If you specified an initial program or service program to debug in the Programs or service programs to be debugged table, the debugger will step into the specified program or service program object.
  • If you did not specify any program or service program in the Programs or service programs to be debugged table, the debugger will stop at the next debuggable statement in the application.
Terminate debug session on program completion If this is selected and a valid program (but not a service program) is specified as the initial program in the Programs or service programs to be debugged table, the debugging session ends when the program runs to completion.
Update production files If the Update production files check box is selected, the application under debug will be allowed to update database records in production libraries.

Source tab

About this task

Group Settings
Source Lookup Path By default, the IBM i Default and Debug engine source containers are listed. The IBM i Default source container allows the debugger to look for the source in the location from which the program object is compiled. The Debug engine source container provides the text for views other than *SOURCE view (for example, *LISTING view or *STATEMENT view). You can specify your own source lookup path:
  1. Click Add to add your own IFS source path.
  2. In the Add Source dialog, click IBM i Source Physical File or Remote Folder.
    • Select IBM i Source Physical File if your source resides in source physical files. Click OK. In the "Select one or more source physical files" dialog, navigate to your source physical files.
    • Select Remote Folder if your source resides in the IFS. Click OK. In the "Browse for a folder" dialog, navigate to the remote folder containing your source.
  3. Click OK. Your source is added to the list under Source Lookup Path.
  4. Click Apply. You can add multiple source paths. The sequence in which they are listed is the sequence in which the debugger searches for the source.
Search for duplicate source files on the path If this check box is not selected, the debugger searches the specified paths in sequence and uses the first occurrence. If this check box is selected, the debugger searches the specified paths and lists all occurrences, allowing you to select one.

Common tab

About this task

Select the Common tab to bring it to the foreground and do the following:

  1. 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 want the launch configuration to be stored in the Location of shared configuration field. Alternatively, you can browse for the project.
  2. If you want the launch configuration to appear in the Debug favorites menu or the Debug menu Debug History list, select the Debug check box in the "Display in favorites menu" area.

Feedback