NonStop Server for Java 7.0 Tools Reference Pages

Connecting for Remote Debugging
1. The Debugger launches the target Java VM.
-launch
jdb -launch ClassName
2. The Debugger attaches to a previously running Java VM.
-attach
jdb -attach hostname:portnum
For this command, the JVM must already be running as a server at
[<hostname>:]<portnum>|<start port>-<end port>
To start the server, use the following command :
java -Xnoagent -Xdebug -Djava.complier=NONE \
agentlib:jdwp=transport=dt_socket,\
nl
address=[<hostname>:]<portnum>|<start port>-<end port>,server=y \
ClassName
If address option is not given, the server will start on any
available port on the local host and print portnum. This portnum
should be used by the jdb to attach.
NOTE: In NonStop, there is an additional option to specify the port range, where, <start
port> and <end port> are the starting and ending port numbers for a range of ports.
3. The target JVM attaches to previously running debugger.
-listen
jdb -listen hostname:portnum
To attach a target JVM, use the following command:
java -Xnoagent -Xdebug -Djava.complier=NONE \
agentlib:jdwp=transport=dt_socket, address=hostname:portnum \
ClassName
4. The Debugger selects a connector.
-connect
jdb -connect option
NOTE: Only the com.sun.jdi.SocketListen option is supported.
The target Java VM can then attach as:
java -Xnoagent -Xdebug -Djava.compiler=NONE \
agentlib:jdwp=transport=dt_socket, address=hostname:portnum \
ClassName
Transports
A Java Platform Debugger Architecture (JPDA) transport is a form of inter-process communication
used by a debugger application and the debuggee. NonStop Server for Java 7.0 provides a socket
transport that uses the standard TCP/IP sockets to communicate between debugger and the
debuggee.
NonStop Server for Java 7.0 defaults to socket transport. NonStop Server for Java 7.0 does not
support shared memory transport.
Connecting for Remote Debugging 33