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

Debugger does not work after reattach

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 13
    • 9, 10, 11
    • core-svc
    • 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

            gadams Gary Adams (Inactive)
            eushakov Egor Ushakov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: