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

Attach to Java Virtual Machine dialog box

ngos400.gif (278 bytes) This dialog box is not available when debugging on the AS/400.

Restriction:  This dialog box applies to interpreted Java programs only. It does not apply to debugging High Performance Compiled Java programs or OS/390 Java program objects.

Use the Attach to Java Virtual Machine dialog box to attach to an already running Java Virtual Machine (JVM). Attaching to a running JVM allows you to debug the interpreted Java program running inside the JVM. When attaching to a JVM, you select the location of execution for the debug engine rather than the location of execution for the program.

Controls and control groupings are described below. Group and subgroup names appear in italics, and control names appear in bold.

Attach method
Create a local engine If checked, the debug engine runs on the local system. Also, debugging control and display take place on the local system. Program execution takes place within the JVM running on a host system. This host system can be your local system or a remote system.

If you choose this option, you must also provide the following information regarding the JVM host system:

JVM Host This field incorporates a selection list containing the names of JVM hosts recently used by the debugger. Select any JVM host name from this list. If the JVM host you want to use is not named in the list, type the name of that host into this field.

If the JVM you want to attach to is running on the local system, the JVM host is "localhost".

Password Enter the agent password for the JVM you want to attach to. This password is provided when you issue the java_g -debug <class name> command to execute your interpreted Java program.
Use a Remote engine If checked, the debug engine runs on a remote system while debugging control and display remain with the local system. Program execution takes place within the JVM running on a host system. This host system can be remote to both your local system and the remote system running the debug engine.

If you choose this option, you must have started the debug engine on the remote system with the irmtdbgj command using the JVM_attach_parameters. You must also provide the following information regarding the remote system:

Engine 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.
Use program profile Check this box if you want the fonts, breakpoints, and monitor settings 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 monitors 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.

Push-buttons
Attach Attaches to the running JVM, then closes the Attach to a Java Virtual Machine dialog box.
Cancel Cancels the attach operation and closes the Attach to a Java Virtual Machine dialog box.
Help Displays this help.