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
|
- Zig
|
||||||
- External Libraries support for zig stdlib
|
- 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]
|
## [14.1.0]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -863,16 +863,11 @@ public abstract class DAPDriver<
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public @NotNull LLValueData getData(@NotNull LLValue value) throws ExecutionException, DebuggerCommandException {
|
public @NotNull LLValueData getData(@NotNull LLValue value) throws ExecutionException, DebuggerCommandException {
|
||||||
String result;
|
String result = "";
|
||||||
int childrenRef = 0;
|
int childrenRef = 0;
|
||||||
|
boolean failed = false;
|
||||||
if (value.getReferenceExpression().isBlank()) {
|
if (value.getReferenceExpression().isBlank()) {
|
||||||
val known = value.getUserData(LLVALUE_DATA);
|
failed = true;
|
||||||
if (known != null)
|
|
||||||
return known;
|
|
||||||
val cRef = value.getUserData(LLVALUE_CHILDREN_REF);
|
|
||||||
if (cRef != null)
|
|
||||||
childrenRef = cRef;
|
|
||||||
result = "";
|
|
||||||
} else {
|
} else {
|
||||||
val args = new EvaluateArguments();
|
val args = new EvaluateArguments();
|
||||||
args.setContext(EvaluateArgumentsContext.VARIABLES);
|
args.setContext(EvaluateArgumentsContext.VARIABLES);
|
||||||
|
@ -882,8 +877,27 @@ public abstract class DAPDriver<
|
||||||
childrenRef = res.getVariablesReference();
|
childrenRef = res.getVariablesReference();
|
||||||
if (childrenRef > 0)
|
if (childrenRef > 0)
|
||||||
value.putUserData(LLVALUE_CHILDREN_REF, childrenRef);
|
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();
|
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);
|
return new LLValueData(result, null, false, childrenRef > 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue