- [NEW] Logpoints
- [NEW] Expresions d'assignació
This commit is contained in:
@@ -202,7 +202,7 @@ constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
r.body = {
|
r.body = {
|
||||||
result: v.value,
|
result: v.value ?? "",
|
||||||
variablesReference
|
variablesReference
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,6 +221,11 @@ constructor() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.type === "log") {
|
||||||
|
this.sendEvent(new OutputEvent(json.payload.text + "\n"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// salida normal
|
// salida normal
|
||||||
this.sendEvent(new OutputEvent(line + "\n", "stdout"));
|
this.sendEvent(new OutputEvent(line + "\n", "stdout"));
|
||||||
}
|
}
|
||||||
@@ -503,15 +508,28 @@ constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
evaluateRequest(response, args) {
|
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._pendingEval = response;
|
||||||
|
|
||||||
|
if (isAssign) {
|
||||||
|
this.sendDebugCommand({
|
||||||
|
cmd: "evalAssign",
|
||||||
|
frame: frameId,
|
||||||
|
expr: expr
|
||||||
|
});
|
||||||
|
} else {
|
||||||
this.sendDebugCommand({
|
this.sendDebugCommand({
|
||||||
cmd: "eval",
|
cmd: "eval",
|
||||||
expr: args.expression
|
expr: expr,
|
||||||
|
frame: frameId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setVariableRequest(response, args) {
|
setVariableRequest(response, args) {
|
||||||
const { variablesReference, name, value } = args;
|
const { variablesReference, name, value } = args;
|
||||||
|
|||||||
Reference in New Issue
Block a user