Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ public CompletableFuture<Response> handle(Command command, Arguments arguments,
} catch (InvalidTypeException | ClassNotLoadedException | IncompatibleThreadStateException
| InvocationException e) {
logger.log(Level.SEVERE, String.format("Failed to get the return value of the method Exception.toString(): %s", e.toString(), e));
} finally {
try {
// See bug https://github.com/microsoft/vscode-java-debug/issues/767:
// The operation exception.invokeMethod above will resume the thread, that will cause
// the previously cached stack frames for this thread to be invalid.
context.getStackFrameManager().reloadStackFrames(thread);
} catch (Exception e) {
// do nothing.
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ public static List<Variable> listLocalVariables(StackFrame stackFrame) throws Ab
return res;
}
try {
for (LocalVariable localVariable : stackFrame.visibleVariables()) {
Variable var = new Variable(localVariable.name(), stackFrame.getValue(localVariable));
List<LocalVariable> localVariables = stackFrame.visibleVariables();
Map<LocalVariable, Value> values = stackFrame.getValues(localVariables);
for (LocalVariable localVariable : localVariables) {
Variable var = new Variable(localVariable.name(), values.get(localVariable));
var.local = localVariable;
res.add(var);
}
Expand Down