JDK-8226941 : Improvements for the Debugging on Demand capabilities
  • Type: Task
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2019-06-28
  • Updated: 2024-07-15
  • Resolved: 2024-07-15
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8224673 :  
Description
In JDK12, SAP has contributed a feature called "Delayed starting of debugging via jcmd". See JDK-8214892. It adds the capability to start a JVM with the JDWP agent loaded but debugging not yet enabled. The user can later on start the actual debugging which will open up a port for the debugger to connect.

This feature had been pushed to the JDK without a broader discussion of the overall "Debugging on Demand" feature, so it was decided to hide the feature for now. See JDK-8226608. There are a few edges that have to be addressed such as:
- naming of commands and options
- usability (e.g. allow later configuration of debugging transport parameters such as port, server/client mode etc.)
- consider adding methods to start the debugging agent to the com.sun.tools.attach.VirtualMachine interface
- performance of the VM with debugging agent loaded but debugging not enabled

This task shall collect subtasks to address these points.
Comments
We'll remove JDWP "onjcmd" through JDK-8336401.
15-07-2024