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

Missing local debug information when debugging JEP-330

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 11.0.1
    • 17
    • tools
    • None
    • b25

    Description

      I am polishing support for [JEP-330|https://openjdk.java.net/jeps/330] in NetBeans ([PR-2938|https://github.com/apache/netbeans/pull/2938]) and I have problems with debugging. Local variables aren't visible as the compiler doesn't pass -g option when compiling the main class. That would require one to pass -g option to the compiler somehow. As far as I can say there is no such way and hence I decided to create this pull request. If I invoke:

      $ java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y x.java

      it detects JDWP is on and adds -g to the compiler arguments. Is this an acceptable improvement? The alternative is to avoid using JEP-330 when debugging and rather generate .class by invoking javac and then run it as usual, but I'd rather rely on JEP-330 and avoid creation of the .class file.

      Attachments

        Issue Links

          Activity

            People

              jtulach Jaroslav Tulach (Inactive)
              jtulach Jaroslav Tulach (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: