public static void addAgentCapturePoints(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);
            var stringArgs = DebuggerUtilsEx.mirrorOfString(writer.toString(), evalContext.getSuspendContext().getVirtualMachine(), evalContext);
            List<StringReference> args = Collections.singletonList(stringArgs);
            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);
    }
  }
public static void addAgentCapturePoints(EvaluationContextImpl evalContext, Properties properties)