Versió 1.0.0

This commit is contained in:
2026-04-12 20:21:15 +02:00
parent 9c11af0e08
commit 24957e575c
7 changed files with 58 additions and 17 deletions

View File

@@ -12,13 +12,13 @@ const {
const { spawn } = require('child_process');
class MyLuaDebugSession extends LoggingDebugSession {
class MiniDebugSession extends LoggingDebugSession {
constructor() {
super();
// Redirigir console.log a la Debug Console
console.log = (...args) => { this.sendEvent(new OutputEvent(args.join(" ") + "\n")); };
//console.log = (...args) => { this.sendEvent(new OutputEvent(args.join(" ") + "\n")); };
console.log("Debug Adapter iniciado");
this._stackFrames = [];
this.setDebuggerLinesStartAt1(true);
@@ -109,6 +109,9 @@ constructor() {
}
if (json.type === "break") {
this._lastStackFrames = null;
this._lastTotalFrames = 0;
this.currentFile = json.file;
this.currentLine = json.line;
@@ -116,11 +119,17 @@ constructor() {
return;
}
if (json.type === "step") {
this._lastStackFrames = null;
this._lastTotalFrames = 0;
this.sendEvent(new StoppedEvent("step", 1));
return;
}
if (json.type === "pause") {
this._lastStackFrames = null;
this._lastTotalFrames = 0;
this.sendEvent(new StoppedEvent("pause", 1));
return;
}
@@ -623,4 +632,4 @@ constructor() {
}
new MyLuaDebugSession().start(process.stdin, process.stdout);
new MiniDebugSession().start(process.stdin, process.stdout);