JDK-8312151 : Deprecate for removal the -Xdebug option
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2023-07-17
  • Updated: 2023-07-18
  • Resolved: 2023-07-18
Related Reports
CSR :  
Duplicate :  
Description
java command allows the -Xdebug option to be specified. As noted in the documentation (dating as far back as Java 8), this option is only there for backward compatibility and currently does nothing https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BGBCIEFC

> -Xdebug
>
>    Does nothing. Provided for backward compatibility.

There are several scripts where this outdated option is still used (mostly due to copy/paste). This current enhancement proposes to officially deprecate this option for removal.
Comments
That other issue https://bugs.openjdk.org/browse/JDK-8227229 did actually provide another crucial detail. Apparently "-debug" is a valid option to the java command and it effectively translates to "-Xdebug" (it's handled in the code). I will actually go ahead and use the other issue and recreate/link the CSR to that one since it has very detailed information. I'll also update the PR to link to the other issue and even deprecate the "-debug" option. Thank you for pointing me to that issue.
18-07-2023

https://bugs.openjdk.org/browse/JDK-8227229 indeed has all the historical details about this option. I didn't remember seeing it before I filed this new issue. Given that the CSR is now linked to this current issue, I'll go ahead and mark JDK-8227229 as a duplicate of this current issue, unless there is any objection.
18-07-2023

JDK-8227229 is the long standing issue to deprecate this option.
18-07-2023