- [NEW] Logpoints
- [NEW] Expresions d'assignació
This commit is contained in:
@@ -202,7 +202,7 @@ constructor() {
|
||||
}
|
||||
|
||||
r.body = {
|
||||
result: v.value,
|
||||
result: v.value ?? "",
|
||||
variablesReference
|
||||
};
|
||||
|
||||
@@ -221,6 +221,11 @@ constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
if (json.type === "log") {
|
||||
this.sendEvent(new OutputEvent(json.payload.text + "\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
// salida normal
|
||||
this.sendEvent(new OutputEvent(line + "\n", "stdout"));
|
||||
}
|
||||
@@ -503,14 +508,27 @@ constructor() {
|
||||
}
|
||||
|
||||
evaluateRequest(response, args) {
|
||||
console.log("[ADAPTER] evaluateRequest:", args.expression);
|
||||
const expr = args.expression;
|
||||
const frameId = args.frameId ?? 0;
|
||||
|
||||
// Detectar asignación: contiene "=" y no empieza por "=="
|
||||
const isAssign = expr.includes("=") && !expr.includes("==");
|
||||
|
||||
this._pendingEval = response;
|
||||
|
||||
this.sendDebugCommand({
|
||||
cmd: "eval",
|
||||
expr: args.expression
|
||||
});
|
||||
if (isAssign) {
|
||||
this.sendDebugCommand({
|
||||
cmd: "evalAssign",
|
||||
frame: frameId,
|
||||
expr: expr
|
||||
});
|
||||
} else {
|
||||
this.sendDebugCommand({
|
||||
cmd: "eval",
|
||||
expr: expr,
|
||||
frame: frameId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setVariableRequest(response, args) {
|
||||
|
||||
Reference in New Issue
Block a user