JDK-8227231 : JDWP help information shows use of obsolete Xdebug flag
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-03
  • Updated: 2019-10-21
  • Resolved: 2019-10-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b19Fixed
Related Reports
CSR :  
Relates :  
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 - see JDK-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)

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/e69d6f076a6a User: dtitov Date: 2019-10-14 18:25:21 +0000
14-10-2019

Would be nice to clean this up in 13 if someone has a few cycles - should be very simple.
04-07-2019