try {
SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
StackFrame stackFrame = threadRef.frame(threadStack.getCurFrame());
LocalVariable localVariable;
localVariable = stackFrame.visibleVariableByName(name);
if (localVariable != null) {
return stackFrame.getValue(localVariable);
}
ReferenceType refType = stackFrame.location().declaringType();