fix: unreliable variable inspector on windows
This commit is contained in:
parent
6514f65980
commit
5b8613fcd0
2 changed files with 27 additions and 8 deletions
|
@ -22,6 +22,11 @@ Changelog structure reference:
|
|||
- Zig
|
||||
- External Libraries support for zig stdlib
|
||||
|
||||
### Fixed
|
||||
|
||||
- Debugging (Windows)
|
||||
- Variables sometimes don't show up in the variable inspector when in breakpoint state
|
||||
|
||||
## [14.1.0]
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -863,16 +863,11 @@ public abstract class DAPDriver<
|
|||
*/
|
||||
@Override
|
||||
public @NotNull LLValueData getData(@NotNull LLValue value) throws ExecutionException, DebuggerCommandException {
|
||||
String result;
|
||||
String result = "";
|
||||
int childrenRef = 0;
|
||||
boolean failed = false;
|
||||
if (value.getReferenceExpression().isBlank()) {
|
||||
val known = value.getUserData(LLVALUE_DATA);
|
||||
if (known != null)
|
||||
return known;
|
||||
val cRef = value.getUserData(LLVALUE_CHILDREN_REF);
|
||||
if (cRef != null)
|
||||
childrenRef = cRef;
|
||||
result = "";
|
||||
failed = true;
|
||||
} else {
|
||||
val args = new EvaluateArguments();
|
||||
args.setContext(EvaluateArgumentsContext.VARIABLES);
|
||||
|
@ -882,8 +877,27 @@ public abstract class DAPDriver<
|
|||
childrenRef = res.getVariablesReference();
|
||||
if (childrenRef > 0)
|
||||
value.putUserData(LLVALUE_CHILDREN_REF, childrenRef);
|
||||
val hint = res.getPresentationHint();
|
||||
if (hint != null) {
|
||||
val attribs = hint.getAttributes();
|
||||
if (attribs != null) {
|
||||
for (val attrib: attribs) {
|
||||
if ("failedEvaluation".equals(attrib)) {
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result = res.getResult();
|
||||
}
|
||||
if (failed) {
|
||||
val known = value.getUserData(LLVALUE_DATA);
|
||||
if (known != null)
|
||||
return known;
|
||||
val cRef = value.getUserData(LLVALUE_CHILDREN_REF);
|
||||
if (cRef != null)
|
||||
childrenRef = cRef;
|
||||
}
|
||||
return new LLValueData(result, null, false, childrenRef > 0, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue