void (Event event) { OverheadTimings.add(myDebugProcess, this, 1, null); if (event instanceof MethodEntryEvent methodEntryEvent) { try { ThreadReference thread = methodEntryEvent.thread(); ThreadRequest request = myThreadRequests.get(thread); if (request != null) { for (SuspendContextImpl context : myDebugProcess.getSuspendManager().getEventContexts()) { ThreadReferenceProxyImpl contextThread = context.getThread(); if (context.isEvaluating() && contextThread != null && contextThread.getThreadReference().equals(thread)) { return; // evaluating - skip } } int indent = thread.frameCount() - request.myStartIndent; String indentString = indent < 0 ? "-" : StringUtil.repeat(" ", indent); Method method = methodEntryEvent.method(); StringBuilder res = new StringBuilder("\n"); res.append(indentString).append(method.declaringType().name()).append('.').append(method.name()).append('('); if (Registry.is("debugger.call.tracing.arguments")) { try { boolean first = true; for (Value value : DebuggerUtilsEx.getArgumentValues(thread.frame(0))) { if (!first) { res.append(", "); } first = false; if (value == null) { res.append("null"); } else if (value instanceof StringReference stringReference) { res.append(stringReference.value()); } else if (value instanceof ObjectReference objectReference) { res.append(StringUtil.getShortName(objectReference.referenceType().name())).append("@") .append(objectReference.uniqueID()); } else { res.append(value); } } } catch (InternalException e) { if (e.errorCode() != JvmtiError.INVALID_SLOT) { // ignore throw e; } } catch (InvalidStackFrameException ignored) { } } else { boolean first = true; for (String typeName : method.argumentTypeNames()) { if (!first) { res.append(", "); } first = false; res.append(StringUtil.getShortName(typeName)); } } res.append(')').append(" thread ").append(thread.uniqueID()); myDebugProcess.printToConsole(res.toString()); } } catch (Exception e) { DebuggerUtilsImpl.logError(e); } } }