import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.intellij.debugger.impl.DebuggerUtilsEx;
import com.intellij.debugger.jdi.VirtualMachineProxyImpl;
+import com.intellij.openapi.util.registry.Registry;
import com.sun.jdi.ClassType;
import com.sun.jdi.Method;
import com.sun.jdi.StringReference;
return vm.mirrorOfStringLiteral(((String)myValue), () -> {
StringReference str = vm.mirrorOf((String)myValue);
// intern starting from jdk 7
- if (vm.versionHigher("1.7")) {
+ if (Registry.is("debugger.intern.string.literals") && vm.versionHigher("1.7")) {
Method internMethod = ((ClassType)str.referenceType()).concreteMethodByName("intern", "()Ljava/lang/String;");
if (internMethod != null) {
return (StringReference)context.getDebugProcess().invokeMethod(context, str, internMethod, Collections.emptyList());
debugger.single.smart.step.force.description=Do force step into on single variant smart step into
debugger.emulate.method.breakpoints=false
debugger.emulate.method.breakpoints.description=Emulate method breakpoints with line breakpoints
+debugger.intern.string.literals=false
+debugger.intern.string.literals.description=Make string literal refer to the same instance of class String
analyze.exceptions.on.the.fly=false
analyze.exceptions.on.the.fly.description=Automatically analyze clipboard on frame activation,\