void (EvaluationContextImpl evalContext, Properties properties) { EvaluationContextImpl evaluationContext = evalContext.withAutoLoadClasses(false); DebugProcessImpl process = evaluationContext.getDebugProcess(); try { ClassType captureClass = (ClassType)process.findClass(evaluationContext, CAPTURE_AGENT_CLASS_NAME, null); if (captureClass == null) { LOG.debug("Error loading debug agent", "agent class not found"); } else { Method method = DebuggerUtils.findMethod(captureClass, "addCapturePoints", null); if (method != null) { StringWriter writer = new StringWriter(); try { properties.store(writer, null); List<StringReference> args = Collections.singletonList(DebuggerUtilsEx.mirrorOfString(writer.toString(), process.getVirtualMachineProxy(), evalContext)); process.invokeMethod(evaluationContext, captureClass, method, args, ObjectReference.INVOKE_SINGLE_THREADED, true); } catch (Exception e) { DebuggerUtilsImpl.logError(e); } } } } catch (EvaluateException e) { LOG.debug("Error loading debug agent", e); } }