Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2292

In debugger, step over compute-intensive line takes "forever", but running to breakpoint is fast

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.2
    • None
    • debugger - Java
    • None
    • Windows 10 pro, Oracle JDK 1.8.0_144

    Description

      Given this code:

      import java.security.KeyPair;
      import java.security.KeyPairGenerator;
      public class Scratch {
      {{ public static void main(String[] args) throws Exception {}}
         KeyPairGenerator rsaKpGen = KeyPairGenerator.getInstance("RSA");
         rsaKpGen.initialize(4096);
         KeyPair kp = rsaKpGen.generateKeyPair();
         int x = 1;
      {{ }}}}

      If I set a breakpoint on the first line of main, then step through one line at a time, it will take "forever" to step over the generateKeyPair(). If I pause the debugger, it is in deep in BigInteger.probablePrime().  However, if I set a breakpoint at x=1 and start debugging, it will get there in a few seconds.

      There are no other breakpoints set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            john.lilley@redpoint.net john lilley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: