diff --git a/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/variables/VariableDetailUtils.java b/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/variables/VariableDetailUtils.java index c6d0d38e0..3fd060625 100644 --- a/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/variables/VariableDetailUtils.java +++ b/com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/variables/VariableDetailUtils.java @@ -163,6 +163,13 @@ public static boolean isLazyLoadingSupported(Value value) { return false; } String inheritedType = findInheritedType(value, COLLECTION_TYPES); + // Map.Entry should not use lazy loading because its details computation + // (getKey + getValue) is lightweight and showing "key:value" inline + // significantly improves UX for large Maps. See + // https://github.com/microsoft/vscode-java-debug/issues/1605 + if (Objects.equals(inheritedType, ENTRY_TYPE)) { + return false; + } if (inheritedType == null && !containsToStringMethod((ObjectReference) value)) { return false; }