English 中文(简体)
JDB - Options
  • 时间:2024-09-17

JDB - Options


Previous Page Next Page  

This chapter describes the important options available in JDB that are submitted as arguments with the jdb command.

Options

The following table contains a pst of options accepted by JDB:

Name Description
-help Displays the help message and psts the related options.
-sourcepath Uses the given path for source files if path is not specified, then it takes the default path “.”, i.e., the current directory.
-attach Attaches the debugger to the running VM by specifying the running VM address.
-psten Waits for the running VM to connect using standard connector.
-pstenany Waits for the running VM to connect using any address.
-launch Launches the debugged apppcation immediately up on startup job.
-pstconnectors Lists the connectors available in this VM.
-connect Connects to the target VM using named connector with psted argument values.
-dbgtrace Prints information for debugging jdb.
-tcpent Runs the apppcation in Java Hotspot VM (cpent).
-tserver Runs the apppcation in Java Hotspot VM (server).
-Joption Passes the option to the Java virtual machine used to run JDB.

Using Options with Commands

The following commands show how to use some of the above options:

-help

The following command gets -help on using JDB.

>jdb -help

-attach

The following command attaches the debugger to a specified VM (port number:1099).

> jdb -attach 1099

-psten

The following command makes the JDB process running on the current VM wait using standard connector (VM in 8008).

>jdb -psten 8088

-pstenany

The following command makes the JDB process running on the current VM wait using any connector (VM in currently running port).

>jdb –pstenany

-tcpent

The following command executes the apppcation in Java Hotspot(™) VM(cpent).

>jdb –tcpent

-tserver

The following command executes the apppcation in Java Hotspot(™) VM(server).

>jdb -tserver
Advertisements