Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

Load Program dialog box

Use the Load Program dialog box to choose a program file to load into the debugger. You can also define the initial debugger environment using start-up options found in this dialog box. Depending on what you are debugging, select the appropriate link:

 

Compiled (Intel/AIX) Select this tab if you want to debug a program that is compiled into native executable code. This includes programs written in C++ or High Performance Compiled Java.
Specify the dominant language the debugger will use Select a language from the selection list. Terms used in debugger menus and dialog boxes will adjust to suit the language terminology used by the selected language.
Advanced Click on Advanced to invoke the Source Search Path dialog box. This dialog box tells the debugger where to look for source files associated with the program you are debugging.
Specify the name of the program to debug This field incorporates a selection list containing the names of programs recently loaded into the debugger. Select any name from this list to load that program into the debugger.

To select a program not named in this list, do one of the following:

  • If you know the name and path of the program, type that name and path directly into this field, or,
  • Click on Browse, then use the controls in the resulting file-selection window to find and select a program.
Enter any program parameters Enter arguments you want to pass to the selected program into this text field. For example, if your program is designed to read a file name and the /xyz option from the parameter list, in that order, enter:
filename /xyz
Select startup behavior You can choose to invoke any combination of the following start-up options when your program is loaded into the debugger:
Use program profile Check this box if you want the window sizes, positions, fonts, and breakpoints for your program restored from the last time you debugged the program. If you are debugging the program for the first time, the debugger windows start up with their default appearance, and no breakpoints are initially set.

If you check this box, any changes you make to the windows and breakpoints are saved.

If you do not want this information to be restored or saved, do not check this box. When the check box is off, the debugger windows start up with their default appearance, and no breakpoints are initially set.

Note: If you add or delete lines in your source file, recompile it, and then debug the program again with a saved program profile, line breakpoints may no longer match the code they were initially set for because line breakpoint information is saved by line number, not by the content of the line.

Debug program initialization Check this box to debug code that executes before the main program entry point is called. You might do this if you are debugging C++ code and you need to debug the constructors for your globally declared C++ class objects (because such objects are constructed before main is entered).
Select local or remote execution of the program Select one of the following options to define the location in which the program being debugged will run.
Local If checked, all program execution and debugging takes place on the local system.
TCP/IP Connection If checked, program execution and I/O takes place on a remote system while debugging control and display remains with the local system. If you choose this option, you must have started a debug engine daemon on the remote system using the irmtdbgc command. You must also provide the following information regarding the remote system:
Host This field incorporates a selection list containing the names of remote hosts recently used by the debugger. Select any remote host name from this list. If the remote host you want to use is not named in the list, type the name of that host into this field.
Port Enter the port number the remote debug engine daemon is listening on. If not specified, port 8000 is assumed.

Remote debugging imposes the following limitations:

  • Halt is not supported when remote debugging.
  • Browse will only display local file systems.
Push-buttons
Load Loads the selected program and options into the debugger, then closes the Load Program dialog box.
Cancel Cancels the load operation and closes the Load Program dialog box. All selections are discarded.
Help Displays this help.
Interpreted (Intel/AIX) Select this tab if you want to debug an interpreted program, for example, interpreted Java.
Dominant language the debugger will use Select a language from the selection list. Terms used in debugger menus and dialog boxes will adjust to suit the language terminology used by the selected language.

If only one interpreted language is supported for debugging, the selection list is disabled.

Enter the class name (without .class) containing main to be invoked This field incorporates a selection list containing the names of programs recently loaded into the debugger. Select any name from this list to load that program into the debugger.

To select a program not named in this list, do one of the following:

  • If you know the name and path of the program, type that name and path directly.
  • Click on Browse, then use the controls in the resulting class-selection window to find and select a class.
Advanced Click on Advanced to invoke the Source Search Path dialog box. This dialog box tells the debugger where to look for source files associated with the program you are debugging.
Enter any program parameters Enter arguments you want to pass to the selected program into this text field. For example, if your program is designed to read a file name and the /xyz option from the parameter list, in that order, enter:
filename /xyz
Enter the program JVM arguments (if any) Enter any supported advanced Java Virtual Machine (JVM) arguments that apply to the program being debugged. Using unsupported arguments will cause the debugger to exit.

For a list of supported JVM arguments, see the related topic below.

Select startup behavior You can choose to invoke any combination of the following start-up options when your program is loaded into the debugger:
Use program profile Check this box if you want the window sizes, positions, fonts, and breakpoints for your program restored from the last time you debugged the program. If you are debugging the program for the first time, the debugger windows start up with their default appearance, and no breakpoints are initially set.

If you check this box, any changes you make to the windows and breakpoints are saved.

If you do not want this information to be restored or saved, do not check this box. When the check box is off, the debugger windows start up with their default appearance, and no breakpoints are initially set.

Note: If you add or delete lines in your source file, recompile it, and then debug the program again with a saved program profile, line breakpoints may no longer match the code they were initially set for because line breakpoint information is saved by line number, not by the content of the line.

Debug program initialization Check this box to debug code that executes before the main program entry point is called. You might do this is if you are debugging C++ code and you need to debug the constructors for your globally declared C++ class objects (because such objects are constructed before main is entered).
Select local or remote execution of the program Select one of the following options to define the location in which the program being debugged will run.
Local If checked, all program execution and debugging takes place on the local system.
TCP/IP Connection If checked, program execution and I/O takes place on a remote system while debugging control and display remains with the local system. If you choose this option, you must have started a debug engine daemon on the remote system using the irmtdbgc command or the irmtdbgj command with the engine_daemon_parameters. You must also provide the following information regarding the remote system:
Host This field incorporates a selection list containing the names of remote hosts recently used by the debugger. Select any remote host name from this list. If the remote host you want to use is not named in the list, type the name of that host into this field.
Port Enter the port number the remote debug engine daemon is listening on. If not specified, port 8000 is assumed.

Remote debugging imposes the following limitations:

  • Halt is not supported when remote debugging.
  • Browse will only display local file systems.
Push-buttons
Load Loads the selected program and options into the debugger, then closes the Load Program dialog box.
Cancel Cancels the load operation and closes the Load Program dialog box. All selections are discarded.
Help Displays this help.

 

AS/400

Select this tab if you want to debug an AS/400 application. This includes programs written in RPG, COBOL, CL, C, C++, or Java.

The functionality of the Load Program dialog box changes depending on whether you are loading a program into the debugger or attaching to a job that is running on the AS/400.

Jobs that are running on the AS/400 are either BCI (enabled to run a threaded application) or interactive (enabled to run an application with input/output). BCI jobs are also referred to as batch immediate or batch jobs. Both BCI and interactive jobs can be attached to by the debugger. When a non-Java application is loaded into the debugger, a BCI job is automatically created on the AS/400. When a Java class is loaded into the debugger, an interactive JVM is created.

Note: Interactive applications should not be run in a BCI job.

When loading a program into the debugger, controls and control groups in this group are used as follows:

Job to debug Do not complete this field.
Job List Use of this push-button is not applicable.
Specify the name of the program to add to debug

Specify the name of the program you want to start for your debugging session. You can enter the program name using the following format:

  • Library/program -- The debugger searches the specified library for the program. If the program is not found in the specified library, an error dialog is displayed.

To locate a Java class that resides on IFS, map the IFS network drive to your workstation, and click on Browse to access the mapped network drive in the Open dialog box.

Enter any program parameters

Enter arguments you want to pass to the selected program into this text field. For example, if your program is designed to read a file name and the /xyz option from the parameter list, in that order, enter:

filename /xyz
Specify the language of the program to debug

Select a language from the selection list. Terms used in debugger menus and dialog boxes will adjust to suit the language terminology used by the selected language.

Note: If a Java class is entered in the Specify the name of the program to add to debug field and a non-Java language is selected, the debugger will display an error message.

Advanced Click on Advanced to invoke the Debugger Settings dialog box. The Debugger Settings dialog box allows you to specify debugger options, JVM creation settings and batch job creation settings.
Select startup behavior You can choose to invoke any combination of the following start-up options when your program is loaded into the debugger:
Use program profile Check this box if you want the pane sizes, positions, fonts, and breakpoints for your program restored from the last time you debugged the program. If you are debugging the program for the first time, the debugger panes start up with their default appearance, and no breakpoints are initially set.

If you check this box, any changes you make to the panes and breakpoints are saved.

If you do not want this information to be restored or saved, do not check this box. When the check box is off, the debugger panes start up with their default appearance, and no breakpoints are initially set.

Note: If you add or delete lines in your source file, recompile it, and then debug the program again with a saved program profile, line breakpoints may no longer match the code they were initially set for because line breakpoint information is saved by line number, not by the content of the line.

Step Into Check this box if you want the debugger to stop at the first executable statement in the program.

Use Step into for debugging ILE and OPM programs written in RPG, COBOL, and CL, and programs that are already running. Otherwise, programs that do not contain a main() function generate a debugger error dialog. Clicking OK on the error dialog will let you continue as if you had selected Step into.

Note: When debugging program initialization, do not select Step Into.

When attaching to a running job on an AS/400, controls and control groups in this group are used as follows:
Job to debug Note: Specifying the job name is not required when debugging Java or Threaded Non-Java.

In this field, specify the name of the AS/400 job you want to debug. A fully qualified AS/400 job name has the format job/user/number, where:

  • job is the name of the job as identified to the system, for example, QPADEV0017.
  • user is the user profile under which the job is running, for example, MYUSER.
  • number is the system-assigned job number, for example, 001234.

If the system-assigned job number is known, then specifying it in the format //number will specify a unique job and specification of job and user will not be necessary.

You can use one of the following methods to retrieve a subset lists of the jobs available on the AS/400 system. Entries are made in the Job Name field and the Job List push-button is clicked to invoke the Job List dialog box:

  • Entering QPADEV0017// gives you a list of jobs with job name QPADEV0017.
  • Entering /MYUSER/ gives you a list of jobs with user profile MYUSER.
  • Entering //001234 gives you the job assigned this job number.

You can also specify an abbreviated job name. The following formats are supported:

*, *ALL, blank All occurrences are found.
abc* All occurrences starting with the character string abc are found.
abc Only exact matches of the character string abc are found.

The following examples illustrate how to use these formats. Entries are made in the Job Name field and the Job List push-button is clicked to invoke the Job List dialog box::

  • Entering QPADEV0017/*ALL/ gives you a list of all the jobs in QPADEV0017.
  • Entering // or leaving the Job Name field blank gives you a list of all the jobs on the system.
  • Entering /G*/ gives you a list of all the jobs that are owned by user IDs that start with a G.
  • Entering G*/*/* gives you a list of all the jobs owned by anyone in a job that starts with a G.

If a wild card indicates a user ID that owns a single job, then specifying the wild card in this field will cause that job to be used. However, using wild cards to indicate multiple jobs is useful only to filter the list of jobs when the Jobs list push-button is selected. When the OK push-button is selected, exactly one job must be indicated or an error dialog is displayed.

Job List Click on Job List to invoke the Job List dialog box. From the jobs listed in this dialog box, select the job you are going to use for debugging.
Specify the name of the program to add to debug When attaching to a job that is running on an AS/400, specifying the program name in this field has the following conveniences:

  • The program will be added as an entry to the Programs pane and the debugger will stop at the first debuggable statement which runs in the job you specified.
  • The debug session will terminate automatically when the program has run to completion. If the program name is not specified, the debug session must be terminated manually.

If desired, specify the name of the program you want to start for your debugging session. You can enter the program name using one of the following formats:

  • Library/program -- The debugger searches the specified library for the program. If the program is not found in the specified library, an error dialog is displayed.
  • *LIBL/program -- All of the libraries in the library list for the job specified in the Job name entry field are searched until the first match for the specified program name is found. If the program is not found in the library list, an error dialog is displayed.
  • *CURLIB/program -- The current library for the job specified in the Job name entry field is used to locate the program. If you do not have a library designed as the current library, QGPL is searched instead. If the program is not found, an error dialog is displayed.
  • Program -- When only the program name is specified, the search path used is the same as that used for *LIBL/program.

If the Job name is not available, you must fully qualify the program name.

If you do not know the name of the program you want to start, click on Browse to access the Open dialog box. Note: This dialog box lists files residing on the workstation only.

Enter any program parameters

If you specified a program name, enter arguments you want to pass to the program into this text field. For example, if your program is designed to read a file name and the /xyz option from the parameter list, in that order, enter:

filename /xyz
Specify the language of the program to debug

Select a language from the selection list. Terms used in debugger menus and dialog boxes will adjust to suit the language terminology used by the selected language.

Note: If a Java class is entered in the Specify the name of the program to add to debug field and a non-Java language is selected, the debugger will display an error message.

Advanced Click on Advanced to invoke the Debugger Settings dialog box. The Debugger Settings dialog box allows you to specify debugger options, JVM creation settings and batch job creation settings.
Select startup behavior You can choose to invoke any combination of the following start-up options when your program is loaded into the debugger:
Use program profile Check this box if you want the pane sizes, positions, fonts, and breakpoints for your program restored from the last time you debugged the program. If you are debugging the program for the first time, the debugger panes start up with their default appearance, and no breakpoints are initially set.

If you check this box, any changes you make to the panes and breakpoints are saved.

If you do not want this information to be restored or saved, do not check this box. When the check box is off, the debugger panes start up with their default appearance, and no breakpoints are initially set.

Note: If you add or delete lines in your source file, recompile it, and then debug the program again with a saved program profile, line breakpoints may no longer match the code they were initially set for because line breakpoint information is saved by line number, not by the content of the line.

Step Into Check this box if you want the debugger to stop at the first executable statement in the program.

Use Step Into for debugging ILE and OPM programs written in RPG, COBOL, and CL, and programs that are already running. Otherwise, programs that do not contain a main() function generate a debugger error dialog. Clicking OK on the error dialog will let you continue as if you had selected Step Into.

If Step Into is selected, you will be asked to call the program to be debugged after clicking the Load push-button.

If Step Into is not selected, the debugger will run in browse source mode. In this mode, the source can be viewed and breakpoints set, however, the application on the AS/400 will not execute. When debugging in browse source mode, running the program under debug will invoke a message that asks you to call the program to be debugged.

Note: When debugging program initialization, do not select Step Into.

Push-buttons
Load Loads the selected program and options into the debugger or attaches to the job that is running on the AS/400, then closes the Load Program dialog box.
Cancel Cancels the load or attach operation and closes the Load Program dialog box. All selections are discarded.
Help Displays this help.

 

OS/390 This tab appears if you do not specify the -qlang option when starting the debugger user interface daemon:
Specify the dominant language the debugger will use Select a language from the selection list. Terms used in debugger menus and dialog boxes will adjust to suit the language terminology used by the selected language.
Advanced Click on Advanced to invoke the Source Search Path dialog box. This dialog box tells the debugger where to look for source files associated with the program you are debugging.
Select startup behavior You can choose to invoke any combination of the following start-up options when your program is loaded into the debugger:
Use program profile Check this box if you want the window sizes, positions, fonts, and breakpoints for your program restored from the last time you debugged the program. If you are debugging the program for the first time, the debugger windows start up with their default appearance, and no breakpoints are initially set.

If you check this box, any changes you make to the windows and breakpoints are saved.

If you do not want this information to be restored or saved, do not check this box. When the check box is off, the debugger windows start up with their default appearance, and no breakpoints are initially set.

Note: If you add or delete lines in your source file, recompile it, and then debug the program again with a saved program profile, line breakpoints may no longer match the code they were initially set for because line breakpoint information is saved by line number, not by the content of the line.

Debug program initialization Check this box to debug code that executes before the main program entry point is called. You might do this if you are debugging C++ code and you need to debug the constructors for your globally declared C++ class objects (because such objects are constructed before main is entered).
Push-buttons
Load Loads the selected program and options into the debugger, then closes the Load Program dialog box.
Cancel Cancels the load operation and closes the Load Program dialog box. All selections are discarded.
Help Displays this help.