Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8227231

JDWP help information shows use of obsolete Xdebug flag

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 14
    • Component/s: core-svc
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      6
    • Resolved In Build:
      b19

      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)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dtitov Daniil Titov (Inactive)
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: