private void installHaltPoint(VirtualMachine vm) { List<ReferenceType> targetClasses = vm .classesByName(VMLocalTarget.class.getName()); ReferenceType classRef = targetClasses.get(0); Method meth = classRef.methodsByName("haltPoint").get(0); BreakpointRequest req = vm.eventRequestManager() .createBreakpointRequest(meth.location()); req.setSuspendPolicy(BreakpointRequest.SUSPEND_EVENT_THREAD); req.enable(); }
private void processClassPrepareEvent() throws AbsentInformationException { EventRequestManager erm = vm.eventRequestManager(); List<ReferenceType> referenceTypes = vm.classesByName(this.location.getContainingClassName()); List listOfLocations = referenceTypes.get(0).locationsOfLine(this.location.getLineNumber()); if (listOfLocations.size() == 0) { throw new RuntimeException("Buggy class not found " + this.location); } com.sun.jdi.Location jdiLocation = (com.sun.jdi.Location) listOfLocations.get(0); this.buggyMethod = jdiLocation.method().name(); breakpointSuspicious = erm.createBreakpointRequest(jdiLocation); breakpointSuspicious.setEnabled(true); initSpoon(); this.initExecutionTime = System.currentTimeMillis(); }
private void processClassPrepareEvent() throws AbsentInformationException { EventRequestManager erm = vm.eventRequestManager(); List<ReferenceType> referenceTypes = vm.classesByName(this.location.getContainingClassName()); // List listOfLocations = // referenceTypes.get(0).locationsOfLine(this.location.getLineNumber()); int loc = this.location.getLineNumber(); List listOfLocations = null; do { listOfLocations = referenceTypes.get(0).locationsOfLine(loc); loc--; } while (loc > 0 && listOfLocations.isEmpty()); if (listOfLocations.size() == 0) { throw new RuntimeException("Buggy class not found " + this.location); } com.sun.jdi.Location jdiLocation = (com.sun.jdi.Location) listOfLocations.get(0); this.buggyMethod = jdiLocation.method().name(); breakpointSuspicious = erm.createBreakpointRequest(jdiLocation); breakpointSuspicious.setEnabled(true); initSpoon(); this.initExecutionTime = System.currentTimeMillis(); }
BreakpointRequest request = vm.eventRequestManager().createBreakpointRequest(location); request.setSuspendPolicy(BreakpointRequest.SUSPEND_EVENT_THREAD); if (hitCount > 0) {
breakpointJump = erm.createBreakpointRequest(jdiLocation); breakpointJump.setEnabled(true); jumpEnabled = true;
breakpointJump = erm.createBreakpointRequest(jdiLocation); breakpointJump.setEnabled(true); jumpEnabled = true;
BreakpointRequest req = erm.createBreakpointRequest( locations.get( 0 ) ); req.putProperty( TEMPORARY, bp.isTemporary() ); req.setEnabled( bp.isActive() && (bp.isActiveWhenMuted() || !_bpm.isMuted()) );
BreakpointRequest request = requestManager.createBreakpointRequest(location);