Description
> java -Xrunjdwp:help
Java Debugger JDWP Agent Library
--------------------------------
(see http://java.sun.com/products/jpda for more information)
...
Warnings
--------
- The older -Xrunjdwp interface can still be used, but will be removed in
a future release, for example:
java -Xdebug -Xrunjdwp:[help]|[<option>=<value>, ...]
---
Xdebug has been a no-op flag since JDK 6 and will finally be deprecated and removed - seeJDK-8227229. Its presence in the JDWP help has unfortunately caused it to be documented externally as the way to run debug agents e.g.
https://stackify.com/java-remote-debugging/
Enabling the Debug Mode
To run a regular serverless Java class Test with debugging enabled in the Oracle HotSpot JVM, you need to use the following command:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y Test
As you can see, you basically need only two JVM options: -Xdebug and -Xrunjdwp. Note that these are X-arguments, which means that they are not standardized and may not work as expected in other JVM implementations.
The -Xdebug argument enables the debugging itself, and the -Xrunjdwp argument configures the JDWP protocol with several important parameters.
---
We should remove the reference to Xdebug from the help (and cleanup the help in other ways where needed e.g. fix this URL:
(see http://java.sun.com/products/jpda for more information)
Java Debugger JDWP Agent Library
--------------------------------
(see http://java.sun.com/products/jpda for more information)
...
Warnings
--------
- The older -Xrunjdwp interface can still be used, but will be removed in
a future release, for example:
java -Xdebug -Xrunjdwp:[help]|[<option>=<value>, ...]
---
Xdebug has been a no-op flag since JDK 6 and will finally be deprecated and removed - see
https://stackify.com/java-remote-debugging/
Enabling the Debug Mode
To run a regular serverless Java class Test with debugging enabled in the Oracle HotSpot JVM, you need to use the following command:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y Test
As you can see, you basically need only two JVM options: -Xdebug and -Xrunjdwp. Note that these are X-arguments, which means that they are not standardized and may not work as expected in other JVM implementations.
The -Xdebug argument enables the debugging itself, and the -Xrunjdwp argument configures the JDWP protocol with several important parameters.
---
We should remove the reference to Xdebug from the help (and cleanup the help in other ways where needed e.g. fix this URL:
(see http://java.sun.com/products/jpda for more information)
Attachments
Issue Links
- csr for
-
JDK-8232075 Remove obsolete Xdebug flag from JDWP help
-
- Closed
-
- relates to
-
JDK-8227229 Deprecate the launcher -Xdebug/-debug flags that have not done anything since Java 6
-
- Resolved
-