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

Debugger does not work after reattach

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10, 11
    • Fix Version/s: 13
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b07

      Description

      steps to reproduce:
      - use the code, set line breakpoint where the comment is
      ```
      public class Endless {
          public static void main(String[] args) {
              try {
                  int read = System.in.read();
                  while(read != -1) {f
                      System.out.println("Read " + read); // breakpoint here
                      read = System.in.read();
                  }
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }
      ```
      - run with VM options `-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555`
      - attach the debugger
      - type anything in the run console and hit enter => debugger stops on a breakpoint
      - stop the debugger (it detaches from the process)
      - attach the debugger again
      - type anything in the run console and hit enter
      Debugger does not stop and the app does not continue until the debugger is detached
      I was able to reproduce it with jdb and IDEA debugger.

        Attachments

          Activity

            People

            • Assignee:
              gadams Gary Adams
              Reporter:
              eushakov Egor Ushakov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: