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

Documentation for debug agent "onthrow" and "onuncaught" arguments needs improvement

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P5
    • tbd
    • 22
    • core-svc

    Description

      "onthrow" and "onuncaught" are documented here:

      https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/conninv.html#oracle-vm-invocation-options

      Some improvements are needed:

      1. The "onthrow" syntax is "onthrow=<execption name>". There is no mention of this in the documentation for this option (it is mentioned in the help output), although there is one example properly showing its use.

      2. Using either option requires that the "launch" option also be used to launch the debugger to attach to. However, it turns out you can already have a debugger launched and ready to attach, yet you still need to specify "launch" or the debug agent will fail to initialize. This happens when also using "suspend=y" indicating that the debug agent should listen for the debugger attach, which may have been initiated by the debugger before the debuggee was even launched. Using "launch=exit" can be done in this case. It would be good to document this.

      There may be other suggestions for improvements. Please feel free to add to this list in the description.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: