JDK-8223394 : Add option to specify the address when starting debugging via jcmd
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2019-05-06
  • Updated: 2024-07-17
  • Resolved: 2024-07-17
Related Reports
Relates :  
Relates :  
Relates :  
Description
You can already start debugging delayed via the VM.start_java_debugging command, if the JDWP agentlib was started with the onjcmd=y option. It will then start a debugging session with address supplied in the JDWP command line.

It would be more flexible to be able to specify the address via the jcmd.

Since the jdwp library already supports a new address and timeout for each session in principle, this feature is not very intrusive.

The error handling has to be changed, since it is no acceptable to exit the VM just because the transport failed. Instead we wait for a new VM.start_java_debugging command after a failure (and after a debugging session has ended).

In addition we also allow a timeout to be set via the jcmd, If not supplied, a default of 30 seconds is used.
Comments
Closing this one since we plan to remove the onjcmd feature with JDK-8336401 altogether.
17-07-2024