1 Reply Latest reply on Aug 27, 2012 7:23 PM by 822292

    Creating a method breakpoint on javax.crypto.Cipher

      Typically when creating a method breakpoint, I would iterate through all classes returned by VirtualMachine.allClasses(), find the one I want, then iterate through the methods, find the one I want, and finally create the breakpoint with EventRequestManager.createBreakpointRequest(Method.location()). When attempting to do this on javax.crypto.Cipher, the class is not shown in the list of VirtalMachine.allClasses() and in turn I cannot create the breakpoint. My questions:

      - Is it possible to create a breakpoint by just knowing the class name and method name? Or obtain a Method or Location object by just knowing the method name? For example: javax.crypto.Cipher.doFinal().
      - Is there a reason why the Cipher class is not showing up in the VirtalMachine.allClasses() method? I am debugging a simple app I wrote that just does AES encryption/decryption on a string - so I know it uses that class.

        • 1. Re: Creating a method breakpoint on javax.crypto.Cipher
          What I ended up doing is:

          EventRequestManager mgr = vm.eventRequestManager();
          MethodExitRequest req = mgr.createMethodExitRequest();

          Then when the breakpoint hit, ended up doing an 'if' on the method string. I am sure there is an easier/faster way, because now all methods get breaked upon, however that is all I could find based on documentation.