[debugger, devkit] IDEA-355621 Ignore PCE while stepping

Merge-request: IJ-MR-145987
Merged-by: Maksim Zuev <Maksim.Zuev@jetbrains.com>

GitOrigin-RevId: 2270b4327c6719e95172b7bc5d969169e2b10636
This commit is contained in:
Maksim Zuev
2024-10-13 19:30:07 +00:00
committed by intellij-monorepo-bot
parent 36d0b02a0d
commit 9855b392a8
10 changed files with 378 additions and 49 deletions
@@ -547,17 +547,31 @@ public final class DebuggerUtilsImpl extends DebuggerUtilsEx {
return new Range<>(variableImpl.getScopeStart(), variableImpl.getScopeEnd());
}
public static @Nullable Value invokeObjectMethod(@NotNull EvaluationContextImpl evaluationContext,
public static @Nullable Value invokeClassMethod(@NotNull EvaluationContext evaluationContext,
@NotNull ClassType type,
@NotNull String methodName,
@Nullable String signature) throws EvaluateException {
Method method = findMethodOrLogError(type, methodName, signature);
if (method == null) return null;
return evaluationContext.getDebugProcess().invokeMethod(evaluationContext, type, method, Collections.emptyList());
}
public static @Nullable Value invokeObjectMethod(@NotNull EvaluationContext evaluationContext,
@NotNull ObjectReference value,
@NotNull String methodName,
@Nullable String signature) throws EvaluateException {
ReferenceType type = value.referenceType();
Method method = findMethodOrLogError(type, methodName, signature);
if (method == null) return null;
return evaluationContext.getDebugProcess().invokeMethod(evaluationContext, value, method, Collections.emptyList());
}
private static @Nullable Method findMethodOrLogError(ReferenceType type, @NotNull String methodName, @Nullable String signature) {
Method method = findMethod(type, methodName, signature);
if (method != null) {
return evaluationContext.getDebugProcess().invokeMethod(evaluationContext, value, method, Collections.emptyList());
if (method == null) {
LOG.error("Method " + methodName + ", signature " + signature + " not found in class " + type.name());
}
LOG.error("Method " + methodName + ", signature " + signature + " not found in class " + type.name());
return null;
return method;
}
public static Value invokeHelperMethod(EvaluationContextImpl evaluationContext,