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

JDWP help information shows use of obsolete Xdebug flag

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 14
    • 13
    • core-svc
    • None
    • 6
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: