-Xdebug
in the Java virtual machine's parameter list (after -classic
when running on the Java
HotSpotTM virtual machine) and note the agent password.
If you choose the JDK 1.1 debugger implementation, you will be required
to enter a host name and password. You can obtain the password
when launching the process by typing -Xdebug
in the Java virtual machine's parameter list (after -classic
when running on HotSpot virtual machine).
If you choose the JPDA, you will be asked for a connector type and its
parameters, which depend on your Java VM implementation. The
Java VM supports two types of connectors: Shared Memory Attach (dt_shmem
) and Socket Attach (dt_socket
).
The Shared Memory Attach connector is available only on the Windows platform. If you choose this connector, you must supply a name for the shared memory that is used to communicate with the debugged process.
If you choose the Socket Attach connector, you must supply the host name of the computer that the Java application runs on and the number of the port on which the debugged JVM is listening. The default host name
is the name of the computer that the IDE runs on. You
can obtain the port number by forcing the JVM to use
a port (address=1111) or by reading the port number from the java.exe
output.
Once the debugger connects to the running virtual machine, you will see threads as if you were debugging locally. If you set a breakpoint in the source code, the Source Editor opens with the breakpoint line highlighted in red.
See also | |
---|---|
Using the Debug Workspace |